Beispiel #1
0
 public IClientProxy Users(IReadOnlyList <string> userIds)
 {
     return(_hubClients.Users(userIds));
 }
Beispiel #2
0
 /// <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()));
 }
Beispiel #3
0
 /// <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="user1">The first user to include.</param>
 /// <param name="user2">The second user to include.</param>
 /// <param name="user3">The third user to include.</param>
 /// <param name="user4">The fourth user to include.</param>
 /// <param name="user5">The fifth user to include.</param>
 /// <param name="user6">The sixth user to include.</param>
 /// <param name="user7">The seventh user to include.</param>
 /// <param name="user8">The eighth user to include.</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, string user1, string user2, string user3, string user4, string user5, string user6, string user7, string user8)
 {
     return(hubClients.Users(new[] { user1, user2, user3, user4, user5, user6, user7, user8 }));
 }
Beispiel #4
0
 /// <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="user1">The first user to include.</param>
 /// <param name="user2">The second user to include.</param>
 /// <param name="user3">The third user to include.</param>
 /// <param name="user4">The fourth user to include.</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, string user1, string user2, string user3, string user4)
 {
     return(hubClients.Users(new[] { user1, user2, user3, user4 }));
 }
Beispiel #5
0
 /// <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="user1">The first user to include.</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, string user1)
 {
     return(hubClients.Users(new[] { user1 }));
 }
 public static T Players <T>(this IHubClients <T> clients, IEnumerable <Guid> playerIds)
 {
     return(clients.Users(playerIds.Select(x => x.ToString()).ToList()));
 }