Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOperation API support for BoundDynamicObjectCreationExpression #20119

Closed
mavasani opened this issue Jun 8, 2017 · 3 comments
Closed

IOperation API support for BoundDynamicObjectCreationExpression #20119

mavasani opened this issue Jun 8, 2017 · 3 comments
Assignees
Labels
Area-Analyzers Bug Concept-API This issue involves adding, removing, clarification, or modification of an API. Feature - IOperation IOperation Urgency-Soon
Milestone

Comments

@mavasani
Copy link
Contributor

mavasani commented Jun 8, 2017

This has similar design aspect as #20114 (comment). BoundDynamicObjectCreationExpression is very similar to BoundObjectCreationExpression, except that we do not have a single bound constructor, but instead a method group of applicable constructors. We can either reuse IObjectCreationExpression with null Constructor and expose a MethodGroup of applicable methods or introduce a new IDynamicObjectCreationExpression as follows:

    public interface IDynamicObjectCreationExpression : IHasArgumentsExpression
    {
        /// <summary>
        /// Applicable methods.
        /// </summary>
        ImmutableArray<IMethodSymbol> ApplicableMethods { get; }
        /// <summary>
        /// List of member or collection initializer expressions in the object initializer, if any.
        /// </summary>
        ImmutableArray<IOperation> Initializers { get; }
    }
@mavasani mavasani added Area-Analyzers Bug Concept-API This issue involves adding, removing, clarification, or modification of an API. Discussion Feature - IOperation IOperation labels Jun 8, 2017
@mavasani
Copy link
Contributor Author

mavasani commented Jun 8, 2017

@jinujoseph Another API to discuss today. We should try to cover all DynamicXXX related expressions.

@jinujoseph jinujoseph added this to the 15.5 milestone Jun 23, 2017
@jinujoseph
Copy link
Contributor

Design Team Decision

Decision was to create a common IDynamicHasArgumentsExpression.. and then each of the dynamic invocation, object creation and indexer access will derive from it. Which should have list of applicable symbols, the name as string (in case we find no applicable symbols) and other props.

@mavasani
Copy link
Contributor Author

Fixed with #20962

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Analyzers Bug Concept-API This issue involves adding, removing, clarification, or modification of an API. Feature - IOperation IOperation Urgency-Soon
Projects
None yet
Development

No branches or pull requests

2 participants