-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Issue215 #228
Issue215 #228
Conversation
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.
some minor textual changes
{ | ||
return Expression.Call(instance, indexerMethod, Expression.Constant(id)); | ||
MethodInfo indexerMethod = instance.Type.GetMethod("get_Item", new[] {typeof(string)}); |
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.
missing some spaces here, did you do a format-file?
@@ -103,5 +103,12 @@ public IExpressionPromoter ExpressionPromoter | |||
/// Renames the (Typed)ParameterExpression empty Name to a the correct supplied name from `it`. Default value is false. | |||
/// </summary> | |||
public bool RenameParameterExpression { get; set; } = false; | |||
|
|||
/// <summary> | |||
/// By default when a member is not found in a type and the type has a string bassed index accessor it will be parsed as an index accesor. Use |
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.
based
@@ -103,5 +103,12 @@ public IExpressionPromoter ExpressionPromoter | |||
/// Renames the (Typed)ParameterExpression empty Name to a the correct supplied name from `it`. Default value is false. | |||
/// </summary> | |||
public bool RenameParameterExpression { get; set; } = false; | |||
|
|||
/// <summary> | |||
/// By default when a member is not found in a type and the type has a string bassed index accessor it will be parsed as an index accesor. Use |
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.
double 's'
/// <summary> | ||
/// By default when a member is not found in a type and the type has a string bassed index accessor it will be parsed as an index accesor. Use | ||
/// this flag to disable this behaviour and have parsing fail when parsing an expression | ||
/// where a member access on a non existing member happens |
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.
/// where a member access on a non existing member happens | |
/// where a member access on a non existing member happens. Default value is false. |
It seems I did forget the CI Pull Request build integration with Azure Pipelines. I did change this and I hope that when you push new code, the build will trigger... |
Codecov Report
@@ Coverage Diff @@
## master #228 +/- ##
==========================================
+ Coverage 96.63% 96.63% +<.01%
==========================================
Files 41 41
Lines 6648 6654 +6
==========================================
+ Hits 6424 6430 +6
Misses 224 224
Continue to review full report at Codecov.
|
@@ -103,5 +103,12 @@ public IExpressionPromoter ExpressionPromoter | |||
/// Renames the (Typed)ParameterExpression empty Name to a the correct supplied name from `it`. Default value is false. | |||
/// </summary> | |||
public bool RenameParameterExpression { get; set; } = false; | |||
|
|||
/// <summary> | |||
/// By default when a member is not found in a type and the type has a string based index accessor it will be parsed as an index accesor. Use |
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.
accessor
1 more typo in still a typo in |
Fixed the typo in accessor, still not sure what the typo in "based" is. |
all ok |
linked to #215 |
2 Changes in this PR.
DynamicClassFactory.cs no longer creates a parameter constructor when the class has no properties. Prior to this, a class with a duplicate empty constructor was created.
Added DisableMemberAccessToIndexAccessorFallback to disable automatic downcast/fallback to item accesor when a member is not found. This is an enhancement for developers because it helps early detection of badly created expressions that will fail to evaluate. Previous behaviour is respected as this is a new optional flag.