Skip to content

Add CallBuilder operator#2279

Draft
glopesdev wants to merge 5 commits intobonsai-rx:mainfrom
glopesdev:method-builder
Draft

Add CallBuilder operator#2279
glopesdev wants to merge 5 commits intobonsai-rx:mainfrom
glopesdev:method-builder

Conversation

@glopesdev
Copy link
Copy Markdown
Member

To improve type manipulation and the flexibility of interfacing with existing modules we provide a new operator Call which is an adapter to construct a sequence selector based on calling an instance method over elements of the sequence.

This operator receives a single input sequence, and calls the appropriate instance method depending on the following properties:

  • MethodName: the name of the instance method to call
  • InstanceSelector: the name of a property on the type of the sequence elements which will be used as the instance on which to call the method
  • ArgumentSelector: a set of zero or more properties contained in the type of the sequence elements which will be used as the arguments to the method call

If multiple overloads are present, the best match is selected using the same overload resolution rules used for resolving operator overloads.

@glopesdev glopesdev requested a review from a team May 7, 2025 19:23
@glopesdev glopesdev added the feature New planned feature label May 7, 2025
@glopesdev
Copy link
Copy Markdown
Member Author

Feedback from DCM is that this still feels like a poor man's version of expression scripting, and may be worth reimagining this feature by expanding the auto-completion capabilities of ExpressionTransform et al. which could be done by setting Scintilla.NET AutoCActive and configuring hooks appropriately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New planned feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant