public AsyncPatternCommand(Expression <Action> expression) { var call = (MethodCallExpression)expression.Body; invocation = new ApmInvocation(call.GetTarget(), call) { Completed = (sender, args) => { Exception = invocation.Exception; SignalCompleted(); } }; }
public AsyncPatternCommand(Expression<Action> expression) { var call = (MethodCallExpression) expression.Body; invocation = new ApmInvocation(call.GetTarget(), call) { Completed = (sender, args) => { Exception = invocation.Exception; SignalCompleted(); } }; }
public AsyncPatternQuery(Expression <Func <TResult> > expression) { var call = (MethodCallExpression)expression.Body; invocation = new ApmInvocation(call.GetTarget(), call) { Completed = (sender, args) => { Result = (TResult)invocation.Result; Exception = invocation.Exception; SignalCompleted(); } }; }