コード例 #1
0
 public async Task Execute(
     Expression <Func <TProxy, Task> > serverCall)
 {
     var mcEx = ValidateCall(serverCall);
     var args = ExpressionBasedParser.CreateInternal(mcEx);
     await _conn.SendCoreAsync(mcEx.Method.Name,
                               args.Select(r => r.Value).ToArray()).ConfigureAwait(false);
 }
コード例 #2
0
        public void Execute(
            Expression <Action <TProxy> > serverCall)
        {
            var mcEx = ValidateCall(serverCall);
            var args = ExpressionBasedParser.CreateInternal(mcEx);

            _conn.SendCoreAsync(mcEx.Method.Name,
                                args.Select(r => r.Value).ToArray()).ConfigureAwait(false)
            .GetAwaiter().GetResult();
        }
コード例 #3
0
        public async Task <TResult> Invoke <TResult>(
            Expression <Func <TProxy, Task <TResult> > > serverCall)
        {
            var mcEx    = ValidateCall(serverCall);
            var m       = mcEx.Method;
            var retType = typeof(TResult);
            var args    = ExpressionBasedParser.CreateInternal(mcEx);

            return((TResult)_conn.InvokeCoreAsync(mcEx.Method.Name, retType,
                                                  args.Select(r => r.Value).ToArray()).ConfigureAwait(false).GetAwaiter().GetResult());
        }