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);
 }
        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();
        }
        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());
        }