-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support MemberExpression and specific MethodCallExpression #4268
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
Conversation
This commit adds support for MemberExpression and specific MethodCallExpression as Expressions that can be passed to Field and PropertyName, in order to resolve a string value from the expression. The specific MethodCallExpression support is to allow F# quotations enclosing Lambda expressions to be supported, when converted using Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter.QuotationToExpression Fixes #4240
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
type = memberExpression.Member.DeclaringType; | ||
break; | ||
case MethodCallExpression methodCallExpression: | ||
// special case F# method call expressions on FuncConvert |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
ported to master |
This commit adds support for MemberExpression and specific MethodCallExpression as Expressions that can be passed to Field and PropertyName, in order to resolve a string value from the expression. The specific MethodCallExpression support is to allow F# quotations enclosing Lambda expressions to be supported, when converted using Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter.QuotationToExpression Fixes #4240 (cherry picked from commit 9949008)
@@ -56,6 +56,7 @@ public Field(PropertyInfo property, double? boost = null, string format = null) | |||
/// </remarks> | |||
public string Format { get; set; } | |||
|
|||
// TODO: Rename to CacheableExpression in 8.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not introduce it now, put an obsolete attribute on this and have the getter and setter populate the new property?
This commit adds support for MemberExpression and specific MethodCallExpression
as Expressions that can be passed to Field and PropertyName, in order to resolve
a string value from the expression.
The specific MethodCallExpression support is to allow F# quotations enclosing
Lambda expressions to be supported, when converted using
Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter.QuotationToExpression
Fixes #4240