CachedExpressionCompiler.Compile<TModel, TValue> Method (Expression<Func<TModel, TValue>>)
Implements caching around LambdaExpression.Compile() so that equivalent expression trees only have to be compiled once.
Namespace: Microsoft.Web.Mvc
Assembly: Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)
Syntax
public static Func<TModel, TValue> Compile<TModel, TValue>(
this Expression<Func<TModel, TValue>> lambdaExpression
)
public:
generic<typename TModel, typename TValue>
[ExtensionAttribute]
static Func<TModel, TValue>^ Compile(
Expression<Func<TModel, TValue>^>^ lambdaExpression
)
static member Compile<'TModel, 'TValue> :
lambdaExpression:Expression<Func<'TModel, 'TValue>> -> Func<'TModel, 'TValue>
<ExtensionAttribute>
Public Shared Function Compile(Of TModel, TValue) (
lambdaExpression As Expression(Of Func(Of TModel, TValue))
) As Func(Of TModel, TValue)
Parameters
lambdaExpression
Type: System.Linq.Expressions.Expression<Func<TModel, TValue>>The expression to compile.
Return Value
Type: System.Func<TModel, TValue>
The object compiled.
Type Parameters
- TModel
The type of the model.
- TValue
The type of the value.
See Also
CachedExpressionCompiler Class
Microsoft.Web.Mvc Namespace
Return to top