public CompileAction ( |
||
linqExpression | The linqExpression. | |
return | object>.Action |
public Action<object, object> CompileAction(LinqExpressionToRun linqExpression)
{
Guard.NotNull(() => linqExpression, linqExpression);
Guard.NotNullOrEmpty(() => linqExpression.Linq, linqExpression.Linq);
var compiler = _objectPool.GetObject();
try
{
return compiler.CompileAction(linqExpression);
}
catch (Exception error)
{
throw new CompileException($"Failed to compile linq expression {linqExpression.Linq}", error,
linqExpression.Linq);
}
finally
{
_objectPool.ReturnObject(compiler);
}
}