 | ExpressionCompilerTryCompileWithPreCreatedClosureTDelegate Method (LambdaExpression, ConstantExpression) |
Tries to compile lambda expression to TDelegate
with the provided closure object and constant expressions (or lack there of) -
Constant expression should be the in order of Fields in closure object!
Note 1: Use it on your own risk - FEC won't verify the expression is compile-able with passed closure, it is up to you!
Note 2: The expression with NESTED LAMBDA IS NOT SUPPORTED!
Note 3: `Label` and `GoTo` are not supported in this case, because they need first round to collect out-of-order labels
Namespace:
SphinxConnector.FluentApi.Helpers
Assembly:
SphinxConnector (in SphinxConnector.dll) Version: 5.2.0
Syntaxpublic static TDelegate TryCompileWithPreCreatedClosure<TDelegate>(
this LambdaExpression lambdaExpr,
params ConstantExpression[] closureConstantsExprs
)
where TDelegate : class
<ExtensionAttribute>
Public Shared Function TryCompileWithPreCreatedClosure(Of TDelegate As Class) (
lambdaExpr As LambdaExpression,
ParamArray closureConstantsExprs As ConstantExpression()
) As TDelegate
Parameters
- lambdaExpr
- Type: System.Linq.ExpressionsLambdaExpression
[Missing <param name="lambdaExpr"/> documentation for "M:SphinxConnector.FluentApi.Helpers.ExpressionCompiler.TryCompileWithPreCreatedClosure``1(System.Linq.Expressions.LambdaExpression,System.Linq.Expressions.ConstantExpression[])"]
- closureConstantsExprs
- Type: System.Linq.ExpressionsConstantExpression
[Missing <param name="closureConstantsExprs"/> documentation for "M:SphinxConnector.FluentApi.Helpers.ExpressionCompiler.TryCompileWithPreCreatedClosure``1(System.Linq.Expressions.LambdaExpression,System.Linq.Expressions.ConstantExpression[])"]
Type Parameters
- TDelegate
[Missing <typeparam name="TDelegate"/> documentation for "M:SphinxConnector.FluentApi.Helpers.ExpressionCompiler.TryCompileWithPreCreatedClosure``1(System.Linq.Expressions.LambdaExpression,System.Linq.Expressions.ConstantExpression[])"]
Return Value
Type:
TDelegate[Missing <returns> documentation for "M:SphinxConnector.FluentApi.Helpers.ExpressionCompiler.TryCompileWithPreCreatedClosure``1(System.Linq.Expressions.LambdaExpression,System.Linq.Expressions.ConstantExpression[])"]
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
LambdaExpression. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also