Inheritance: Invocation
Exemple #1
0
        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();
                }
            };
        }
Exemple #3
0
        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();
                }
            };
        }