Add an extension method Users to IHubClients witch takes IEnumerable parameter (#17360)
This commit is contained in:
parent
3af94f18cb
commit
bc0c7121ef
|
|
@ -84,6 +84,7 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
}
|
||||
public static partial class HubClientsExtensions
|
||||
{
|
||||
public static T AllExcept<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, System.Collections.Generic.IEnumerable<string> excludedConnectionIds) { throw null; }
|
||||
public static T AllExcept<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string excludedConnectionId1) { throw null; }
|
||||
public static T AllExcept<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string excludedConnectionId1, string excludedConnectionId2) { throw null; }
|
||||
public static T AllExcept<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3) { throw null; }
|
||||
|
|
@ -92,6 +93,7 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
public static T AllExcept<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4, string excludedConnectionId5, string excludedConnectionId6) { throw null; }
|
||||
public static T AllExcept<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4, string excludedConnectionId5, string excludedConnectionId6, string excludedConnectionId7) { throw null; }
|
||||
public static T AllExcept<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4, string excludedConnectionId5, string excludedConnectionId6, string excludedConnectionId7, string excludedConnectionId8) { throw null; }
|
||||
public static T Clients<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, System.Collections.Generic.IEnumerable<string> connectionIds) { throw null; }
|
||||
public static T Clients<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string connection1) { throw null; }
|
||||
public static T Clients<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string connection1, string connection2) { throw null; }
|
||||
public static T Clients<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string connection1, string connection2, string connection3) { throw null; }
|
||||
|
|
@ -100,6 +102,7 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
public static T Clients<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string connection1, string connection2, string connection3, string connection4, string connection5, string connection6) { throw null; }
|
||||
public static T Clients<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string connection1, string connection2, string connection3, string connection4, string connection5, string connection6, string connection7) { throw null; }
|
||||
public static T Clients<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string connection1, string connection2, string connection3, string connection4, string connection5, string connection6, string connection7, string connection8) { throw null; }
|
||||
public static T GroupExcept<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string groupName, System.Collections.Generic.IEnumerable<string> excludedConnectionIds) { throw null; }
|
||||
public static T GroupExcept<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string groupName, string excludedConnectionId1) { throw null; }
|
||||
public static T GroupExcept<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string groupName, string excludedConnectionId1, string excludedConnectionId2) { throw null; }
|
||||
public static T GroupExcept<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string groupName, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3) { throw null; }
|
||||
|
|
@ -108,6 +111,7 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
public static T GroupExcept<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string groupName, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4, string excludedConnectionId5, string excludedConnectionId6) { throw null; }
|
||||
public static T GroupExcept<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string groupName, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4, string excludedConnectionId5, string excludedConnectionId6, string excludedConnectionId7) { throw null; }
|
||||
public static T GroupExcept<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string groupName, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4, string excludedConnectionId5, string excludedConnectionId6, string excludedConnectionId7, string excludedConnectionId8) { throw null; }
|
||||
public static T Groups<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, System.Collections.Generic.IEnumerable<string> groupNames) { throw null; }
|
||||
public static T Groups<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string group1) { throw null; }
|
||||
public static T Groups<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string group1, string group2) { throw null; }
|
||||
public static T Groups<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string group1, string group2, string group3) { throw null; }
|
||||
|
|
@ -116,6 +120,7 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
public static T Groups<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string group1, string group2, string group3, string group4, string group5, string group6) { throw null; }
|
||||
public static T Groups<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string group1, string group2, string group3, string group4, string group5, string group6, string group7) { throw null; }
|
||||
public static T Groups<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string group1, string group2, string group3, string group4, string group5, string group6, string group7, string group8) { throw null; }
|
||||
public static T Users<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, System.Collections.Generic.IEnumerable<string> userIds) { throw null; }
|
||||
public static T Users<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string user1) { throw null; }
|
||||
public static T Users<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string user1, string user2) { throw null; }
|
||||
public static T Users<T>(this Microsoft.AspNetCore.SignalR.IHubClients<T> hubClients, string user1, string user2, string user3) { throw null; }
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Microsoft.AspNetCore.SignalR
|
||||
{
|
||||
|
|
@ -126,6 +127,17 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
return hubClients.AllExcept(new [] { excludedConnectionId1, excludedConnectionId2, excludedConnectionId3, excludedConnectionId4, excludedConnectionId5, excludedConnectionId6, excludedConnectionId7, excludedConnectionId8 });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <typeparamref name="T" /> that can be used to invoke methods on all clients connected to the hub excluding the specified connections.
|
||||
/// </summary>
|
||||
/// <param name="hubClients">The abstraction that provides access to connections.</param>
|
||||
/// <param name="excludedConnectionIds">The connection IDs to exclude.</param>
|
||||
/// <returns>A <typeparamref name="T" /> representing the methods that can be invoked on the clients.</returns>
|
||||
public static T AllExcept<T>(this IHubClients<T> hubClients, IEnumerable<string> excludedConnectionIds)
|
||||
{
|
||||
return hubClients.AllExcept(excludedConnectionIds.ToList());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <typeparamref name="T" /> that can be used to invoke methods on the specified connections.
|
||||
/// </summary>
|
||||
|
|
@ -242,6 +254,17 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
return hubClients.Clients(new [] { connection1, connection2, connection3, connection4, connection5, connection6, connection7, connection8 });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <typeparamref name="T" /> that can be used to invoke methods on the specified connections.
|
||||
/// </summary>
|
||||
/// <param name="hubClients">The abstraction that provides access to connections.</param>
|
||||
/// <param name="connectionIds">The connection IDs.</param>
|
||||
/// <returns>A <typeparamref name="T" /> representing the methods that can be invoked on the clients.</returns>
|
||||
public static T Clients<T>(this IHubClients<T> hubClients, IEnumerable<string> connectionIds)
|
||||
{
|
||||
return hubClients.Clients(connectionIds.ToList());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <typeparamref name="T" /> that can be used to invoke methods on all connections in all of the specified groups.
|
||||
/// </summary>
|
||||
|
|
@ -358,6 +381,17 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
return hubClients.Groups(new [] { group1, group2, group3, group4, group5, group6, group7, group8 });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <typeparamref name="T" /> that can be used to invoke methods on all connections in all of the specified groups.
|
||||
/// </summary>
|
||||
/// <param name="hubClients">The abstraction that provides access to connections.</param>
|
||||
/// <param name="groupNames">The group names.</param>
|
||||
/// <returns>A <typeparamref name="T" /> representing the methods that can be invoked on the clients.</returns>
|
||||
public static T Groups<T>(this IHubClients<T> hubClients, IEnumerable<string> groupNames)
|
||||
{
|
||||
return hubClients.Groups(groupNames.ToList());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <typeparamref name="T" /> that can be used to invoke methods on all connections in the specified group excluding the specified connections.
|
||||
/// </summary>
|
||||
|
|
@ -482,6 +516,18 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
return hubClients.GroupExcept(groupName, new [] { excludedConnectionId1, excludedConnectionId2, excludedConnectionId3, excludedConnectionId4, excludedConnectionId5, excludedConnectionId6, excludedConnectionId7, excludedConnectionId8 });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <typeparamref name="T" /> that can be used to invoke methods on all connections in the specified group excluding the specified connections.
|
||||
/// </summary>
|
||||
/// <param name="hubClients">The abstraction that provides access to connections.</param>
|
||||
/// <param name="groupName">The group name.</param>
|
||||
/// <param name="excludedConnectionIds">The connection IDs to exclude.</param>
|
||||
/// <returns>A <typeparamref name="T" /> representing the methods that can be invoked on the clients.</returns>
|
||||
public static T GroupExcept<T>(this IHubClients<T> hubClients, string groupName, IEnumerable<string> excludedConnectionIds)
|
||||
{
|
||||
return hubClients.GroupExcept(groupName, excludedConnectionIds.ToList());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <typeparamref name="T" /> that can be used to invoke methods on all connections associated with all of the specified users.
|
||||
/// </summary>
|
||||
|
|
@ -597,5 +643,16 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
{
|
||||
return hubClients.Users(new [] { user1, user2, user3, user4, user5, user6, user7, user8 });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <typeparamref name="T" /> that can be used to invoke methods on all connections associated with all of the specified users.
|
||||
/// </summary>
|
||||
/// <param name="hubClients">The abstraction that provides access to connections.</param>
|
||||
/// <param name="userIds">The user IDs.</param>
|
||||
/// <returns>A <typeparamref name="T" /> representing the methods that can be invoked on the clients.</returns>
|
||||
public static T Users<T>(this IHubClients<T> hubClients, IEnumerable<string> userIds)
|
||||
{
|
||||
return hubClients.Users(userIds.ToList());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue