@@ -127,6 +127,17 @@ public static T AllExcept<T>(this IHubClients<T> hubClients, string excludedConn
127
127
return hubClients . AllExcept ( new [ ] { excludedConnectionId1 , excludedConnectionId2 , excludedConnectionId3 , excludedConnectionId4 , excludedConnectionId5 , excludedConnectionId6 , excludedConnectionId7 , excludedConnectionId8 } ) ;
128
128
}
129
129
130
+ /// <summary>
131
+ /// Gets a <typeparamref name="T" /> that can be used to invoke methods on all clients connected to the hub excluding the specified connections.
132
+ /// </summary>
133
+ /// <param name="hubClients">The abstraction that provides access to connections.</param>
134
+ /// <param name="excludedConnectionIds">The connection IDs to exclude.</param>
135
+ /// <returns>A <typeparamref name="T" /> representing the methods that can be invoked on the clients.</returns>
136
+ public static T AllExcept < T > ( this IHubClients < T > hubClients , IEnumerable < string > excludedConnectionIds )
137
+ {
138
+ return hubClients . AllExcept ( excludedConnectionIds . ToList ( ) ) ;
139
+ }
140
+
130
141
/// <summary>
131
142
/// Gets a <typeparamref name="T" /> that can be used to invoke methods on the specified connections.
132
143
/// </summary>
@@ -243,6 +254,17 @@ public static T Clients<T>(this IHubClients<T> hubClients, string connection1, s
243
254
return hubClients . Clients ( new [ ] { connection1 , connection2 , connection3 , connection4 , connection5 , connection6 , connection7 , connection8 } ) ;
244
255
}
245
256
257
+ /// <summary>
258
+ /// Gets a <typeparamref name="T" /> that can be used to invoke methods on the specified connections.
259
+ /// </summary>
260
+ /// <param name="hubClients">The abstraction that provides access to connections.</param>
261
+ /// <param name="connectionIds">The connection IDs.</param>
262
+ /// <returns>A <typeparamref name="T" /> representing the methods that can be invoked on the clients.</returns>
263
+ public static T Clients < T > ( this IHubClients < T > hubClients , IEnumerable < string > connectionIds )
264
+ {
265
+ return hubClients . Clients ( connectionIds . ToList ( ) ) ;
266
+ }
267
+
246
268
/// <summary>
247
269
/// Gets a <typeparamref name="T" /> that can be used to invoke methods on all connections in all of the specified groups.
248
270
/// </summary>
@@ -359,6 +381,17 @@ public static T Groups<T>(this IHubClients<T> hubClients, string group1, string
359
381
return hubClients . Groups ( new [ ] { group1 , group2 , group3 , group4 , group5 , group6 , group7 , group8 } ) ;
360
382
}
361
383
384
+ /// <summary>
385
+ /// Gets a <typeparamref name="T" /> that can be used to invoke methods on all connections in all of the specified groups.
386
+ /// </summary>
387
+ /// <param name="hubClients">The abstraction that provides access to connections.</param>
388
+ /// <param name="groupNames">The group names.</param>
389
+ /// <returns>A <typeparamref name="T" /> representing the methods that can be invoked on the clients.</returns>
390
+ public static T Groups < T > ( this IHubClients < T > hubClients , IEnumerable < string > groupNames )
391
+ {
392
+ return hubClients . Groups ( groupNames . ToList ( ) ) ;
393
+ }
394
+
362
395
/// <summary>
363
396
/// Gets a <typeparamref name="T" /> that can be used to invoke methods on all connections in the specified group excluding the specified connections.
364
397
/// </summary>
@@ -484,25 +517,25 @@ public static T GroupExcept<T>(this IHubClients<T> hubClients, string groupName,
484
517
}
485
518
486
519
/// <summary>
487
- /// Gets a <typeparamref name="T" /> that can be used to invoke methods on all connections associated with all of the specified users .
520
+ /// Gets a <typeparamref name="T" /> that can be used to invoke methods on all connections in the specified group excluding the specified connections .
488
521
/// </summary>
489
522
/// <param name="hubClients">The abstraction that provides access to connections.</param>
490
- /// <param name="user1 ">The first user to include .</param>
523
+ /// <param name="excludedConnectionIds ">The connection IDs to exclude .</param>
491
524
/// <returns>A <typeparamref name="T" /> representing the methods that can be invoked on the clients.</returns>
492
- public static T Users < T > ( this IHubClients < T > hubClients , string user1 )
525
+ public static T GroupExcept < T > ( this IHubClients < T > hubClients , IEnumerable < string > excludedConnectionIds )
493
526
{
494
- return hubClients . Users ( new [ ] { user1 } ) ;
527
+ return hubClients . GroupExcept ( excludedConnectionIds . ToList ( ) ) ;
495
528
}
496
529
497
530
/// <summary>
498
531
/// Gets a <typeparamref name="T" /> that can be used to invoke methods on all connections associated with all of the specified users.
499
532
/// </summary>
500
533
/// <param name="hubClients">The abstraction that provides access to connections.</param>
501
- /// <param name="userIds ">The user IDs .</param>
534
+ /// <param name="user1 ">The first user to include .</param>
502
535
/// <returns>A <typeparamref name="T" /> representing the methods that can be invoked on the clients.</returns>
503
- public static T Users < T > ( this IHubClients < T > hubClients , IEnumerable < string > userIds )
536
+ public static T Users < T > ( this IHubClients < T > hubClients , string user1 )
504
537
{
505
- return hubClients . Users ( userIds . ToList ( ) ) ;
538
+ return hubClients . Users ( new [ ] { user1 } ) ;
506
539
}
507
540
508
541
/// <summary>
@@ -609,5 +642,16 @@ public static T Users<T>(this IHubClients<T> hubClients, string user1, string us
609
642
{
610
643
return hubClients . Users ( new [ ] { user1 , user2 , user3 , user4 , user5 , user6 , user7 , user8 } ) ;
611
644
}
645
+
646
+ /// <summary>
647
+ /// Gets a <typeparamref name="T" /> that can be used to invoke methods on all connections associated with all of the specified users.
648
+ /// </summary>
649
+ /// <param name="hubClients">The abstraction that provides access to connections.</param>
650
+ /// <param name="userIds">The user IDs.</param>
651
+ /// <returns>A <typeparamref name="T" /> representing the methods that can be invoked on the clients.</returns>
652
+ public static T Users < T > ( this IHubClients < T > hubClients , IEnumerable < string > userIds )
653
+ {
654
+ return hubClients . Users ( userIds . ToList ( ) ) ;
655
+ }
612
656
}
613
657
}
0 commit comments