Microsoft.AspNetCore.SignalR.ConnectionExtensions.Send C# (CSharp) Method

Send() public static method

Sends a message to all connections subscribed to the specified signal. An example of signal may be a specific connection id.
public static Send ( this connection, IList connectionIds, object value ) : System.Threading.Tasks.Task
connection this The connection
connectionIds IList The connection ids to send to.
value object The value to publish.
return System.Threading.Tasks.Task
        public static Task Send(this IConnection connection, IList<string> connectionIds, object value)
        {
            if (connection == null)
            {
                throw new ArgumentNullException("connection");
            }

            if (connectionIds == null)
            {
                throw new ArgumentNullException("connectionIds");
            }

            var message = new ConnectionMessage(connectionIds.Select(c => PrefixHelper.GetConnectionId(c)).ToList(),
                                                value);

            return connection.Send(message);
        }

Same methods

ConnectionExtensions::Send ( this connection, string connectionId, object value ) : System.Threading.Tasks.Task
ConnectionExtensions