public IClientInvoker Group(string group) { return(new ClientInvoker( async(methodName, args) => { var message = new Message() { MessageType = MessageType.ClientMethodInvocation, Data = MessageSerializer.SerializeObject(new InvocationDescriptor() { MethodName = methodName, Arguments = args }) }; await _backplane.SendMessageGroupAsync(group, message).ConfigureAwait(false); }, async msg => { await _backplane.SendMessageAsync(group, msg).ConfigureAwait(false); }, (g) => { throw new NotImplementedException(); }, (g) => { throw new NotImplementedException(); })); }
public static Task InvokeAsync(this IBackplane backplane, string connectionId, string methodName, params object[] arguments) { return(backplane.SendMessageAsync(connectionId, new Message { MessageType = MessageType.ClientMethodInvocation, Data = MessageSerializer.SerializeObject(new InvocationDescriptor() { MethodName = methodName, Arguments = arguments }) })); }