/// <summary> /// Invokes Response_VM on multple connections. /// </summary> /// <param name="connectionId">SignalR connection.</param> /// <param name="vmId">Identifies the view model.</param> /// <param name="vmData">View model data.</param> public Task SendToManyAsync(IReadOnlyList <string> connectionIds, string vmId, string vmData) { return(_hubContext.Clients.Clients(_connectionId).SendAsync(RESPONSE_VM, new object[] { nameof(SendToManyAsync), new object[] { vmId, vmData }, DotNetifyHubForwarder.BuildResponseMetadata(connectionIds.ToArray()) })); }
/// <summary> /// Removes a connection from a group. /// </summary> /// <param name="connectionId">SignalR connection.</param> /// <param name="groupName">SignalR group name.</param> public Task RemoveFromGroupAsync(string connectionId, string groupName) { return(_hubContext.Clients.Client(_connectionId).SendAsync(RESPONSE_VM, new object[] { nameof(RemoveFromGroupAsync), new object[] { groupName }, DotNetifyHubForwarder.BuildResponseMetadata(connectionId) })); }
/// <summary> /// Invokes Response_VM on a connection. /// </summary> /// <param name="connectionId">SignalR connection.</param> /// <param name="vmId">Identifies the view model.</param> /// <param name="vmData">View model data.</param> public Task SendAsync(string connectionId, string vmId, string vmData) { return(_hubContext.Clients.Client(_connectionId).SendAsync(RESPONSE_VM, new object[] { nameof(SendAsync), new object[] { vmId, vmData }, DotNetifyHubForwarder.BuildResponseMetadata(connectionId) })); }
/// <summary> /// Invokes Response_VM on a group but exclude some connections. /// </summary> /// <param name="groupName">SignalR group name.</param> /// <param name="excludedConnectionIds">Excluded SignalR connections.</param> /// <param name="vmId">Identifies the view model.</param> /// <param name="vmData">View model data.</param> public Task SendToGroupExceptAsync(string groupName, IReadOnlyList <string> excludedConnectionIds, string vmId, string vmData) { return(_hubContext.Clients.Client(_connectionId).SendAsync(RESPONSE_VM, new object[] { nameof(SendToGroupExceptAsync), new object[] { groupName, vmId, vmData }, DotNetifyHubForwarder.BuildResponseMetadata(excludedConnectionIds.ToArray()) })); }