FlowR.Core/ApplicationCommunication.cs
/// <summary>
///     Send a message to SignalR Client, don't wait for response
/// </summary>
/// <param name="message"></param>
Send a message to SignalR Client, don't wait for response
Send a message to SignalR Client don ' t wait for response
public Task SendMessage(IMessage message)
        {
            var method = message.GetRequestedAction();
            var args = message.GetArgumentValues();
            return args.Length switch
            {
                0 => Client.SendAsync(method),
                1 => Client.SendAsync(method, args[0]),
                2 => Client.SendAsync(method, args[0], args[1]),
                3 => Client.SendAsync(method, args[0], args[1], args[2]),
                4 => Client.SendAsync(method, args[0], args[1], args[2], args[3]),
                5 => Client.SendAsync(method, args[0], args[1], args[2], args[3], args[4]),
                6 => Client.SendAsync(method, args[0], args[1], args[2], args[3], args[4], args[5]),
                _ => throw new Exception("Message Arguments Array to long"),
            };
        }
public Task SendMessage ( IMessage message ) { var method = message . GetRequestedAction ( ) ; var args = message . GetArgumentValues ( ) ; return args . Length switch { 0 => Client . SendAsync ( method ) , 1 => Client . SendAsync ( method , args [ 0 ] ) , 2 => Client . SendAsync ( method , args [ 0 ] , args [ 1 ] ) , 3 => Client . SendAsync ( method , args [ 0 ] , args [ 1 ] , args [ 2 ] ) , 4 => Client . SendAsync ( method , args [ 0 ] , args [ 1 ] , args [ 2 ] , args [ 3 ] ) , 5 => Client . SendAsync ( method , args [ 0 ] , args [ 1 ] , args [ 2 ] , args [ 3 ] , args [ 4 ] ) , 6 => Client . SendAsync ( method , args [ 0 ] , args [ 1 ] , args [ 2 ] , args [ 3 ] , args [ 4 ] , args [ 5 ] ) , _ => throw new Exception ( " " ) , } ; }
Send a message to SignalR Client, don't wait for response
Send a message to SignalR Client don ' t wait for response
message
IMessage
None