Пример #1
0
 private static async ValueTask <HubInvocationResult> InvokeCoreTaskAsync(T instance, HubInvokeMessage invokeMessage)
 {
     await((Task)invokeMessage.MethodDefinition.Method.Invoke(instance, invokeMessage.Arguments) !);
     return(new HubInvocationResult());
 }
Пример #2
0
        private static async ValueTask <HubInvocationResult> InvokeCoreValueTaskAsync <TResult>(T instance, HubInvokeMessage invokeMessage)
        {
            var task = (ValueTask <TResult>)invokeMessage.MethodDefinition.Method.Invoke(instance, invokeMessage.Arguments) !;

            return(new HubInvocationResult(await task));
        }
Пример #3
0
 public async ValueTask <HubInvocationResult> InvokeAsync(T instance, HubInvokeMessage invokeMessage)
 {
     return(await _methodInvoker[invokeMessage.Method](instance, invokeMessage));
 }
Пример #4
0
        private static ValueTask <HubInvocationResult> InvokeCore(T instance, HubInvokeMessage invokeMessage)
        {
            var result = invokeMessage.MethodDefinition.Method.Invoke(instance, invokeMessage.Arguments);

            return(new ValueTask <HubInvocationResult>(new HubInvocationResult(result)));
        }
Пример #5
0
 ValueTask <HubInvocationResult> IHubInvoker.InvokeAsync(object instance, HubInvokeMessage invokeMessage)
 {
     return(InvokeAsync((T)instance, invokeMessage));
 }