You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand wanting to keep LexicalScope an internal implementation detail.
But allowing adding statements manually instead of using CodeGenerator would be really helpful when there is a lot of existing code using standard System.Linq.Expressions patterns.
If I could manually call LexicalScope.Current.AddStatement, it would save me a lot of code rewriting. And make gradual migrations to the dotNext LinqEx handling.
Preferably I would like to be able to do the following:
Create a LexicalScope/AsyncLambdaExpression using manually specified ParameterExpression[], instead of just System.Type[]
Be able to manually construct the LexicalScope, specifically using ILexicalScope.AddStatement
The text was updated successfully, but these errors were encountered:
Yes, I can add support of ParameterExpression[] for AsyncLambdaExpression and LambdaExpression
LexicalScope is really internal thing. It is tightly coupled with thread-local storage to follow the natural flow of instructions. Leakage of this abstraction can cause unpredictable behavior. For instance, you will save the reference to the scope and share it with another thread or reuse after construction. But I can add public static CodeGenerator.AddStatement method for the convenience.
I'm closing issue because Statement static method has been added to release 3.3.0 and no additional feedback was received. @koliyo feel free to reopen this issue if you have a concrete suggestion about API design.
I understand wanting to keep LexicalScope an internal implementation detail.
But allowing adding statements manually instead of using CodeGenerator would be really helpful when there is a lot of existing code using standard
System.Linq.Expressions
patterns.If I could manually call
LexicalScope.Current.AddStatement
, it would save me a lot of code rewriting. And make gradual migrations to the dotNext LinqEx handling.Preferably I would like to be able to do the following:
LexicalScope
/AsyncLambdaExpression
using manually specifiedParameterExpression[]
, instead of justSystem.Type[]
LexicalScope
, specifically usingILexicalScope.AddStatement
The text was updated successfully, but these errors were encountered: