Conversation
StefH
left a comment
There was a problem hiding this comment.
some minor textual changes
| if (!_parsingConfig.DisableMemberAccessToIndexAccesorDowncast) | ||
| { | ||
| 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.
missing some spaces here, did you do a format-file?
| 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 |
| 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 |
| /// <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.
| /// 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.
|
| 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 |
|
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.