diff --git a/benchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks/RedisHubLifetimeManagerBenchmark.cs b/benchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks/RedisHubLifetimeManagerBenchmark.cs index 44930f1c3c..3e333ddd74 100644 --- a/benchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks/RedisHubLifetimeManagerBenchmark.cs +++ b/benchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks/RedisHubLifetimeManagerBenchmark.cs @@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.SignalR.Microbenchmarks private RedisHubLifetimeManager _manager2; private TestClient[] _clients; private object[] _args; - private readonly List _excludedIds = new List(); + private readonly List _excludedConnectionIds = new List(); private readonly List _sendIds = new List(); private readonly List _groups = new List(); private readonly List _users = new List(); @@ -70,7 +70,7 @@ namespace Microsoft.AspNetCore.SignalR.Microbenchmarks { group = "Evens"; user = "EvenUser"; - _excludedIds.Add(_clients[i].Connection.ConnectionId); + _excludedConnectionIds.Add(_clients[i].Connection.ConnectionId); } else { @@ -144,13 +144,13 @@ namespace Microsoft.AspNetCore.SignalR.Microbenchmarks [Benchmark] public async Task SendAllExcept() { - await _manager1.SendAllExceptAsync("Test", _args, _excludedIds); + await _manager1.SendAllExceptAsync("Test", _args, _excludedConnectionIds); } [Benchmark] public async Task SendGroupExcept() { - await _manager1.SendGroupExceptAsync("Everyone", "Test", _args, _excludedIds); + await _manager1.SendGroupExceptAsync("Everyone", "Test", _args, _excludedConnectionIds); } [Benchmark] diff --git a/benchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks/RedisProtocolBenchmark.cs b/benchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks/RedisProtocolBenchmark.cs index 74c8e259ff..3008ed999c 100644 --- a/benchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks/RedisProtocolBenchmark.cs +++ b/benchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks/RedisProtocolBenchmark.cs @@ -17,8 +17,8 @@ namespace Microsoft.AspNetCore.SignalR.Microbenchmarks private RedisGroupCommand _groupCommand; private object[] _args; private string _methodName; - private IReadOnlyList _excludedIdsSmall; - private IReadOnlyList _excludedIdsLarge; + private IReadOnlyList _excludedConnectionIdsSmall; + private IReadOnlyList _excludedConnectionIdsLarge; private byte[] _writtenAck; private byte[] _writtenGroupCommand; private byte[] _writtenInvocationNoExclusions; @@ -39,14 +39,14 @@ namespace Microsoft.AspNetCore.SignalR.Microbenchmarks _args = Array.Empty(); _methodName = "Method"; - _excludedIdsSmall = GenerateIds(2); - _excludedIdsLarge = GenerateIds(20); + _excludedConnectionIdsSmall = GenerateIds(2); + _excludedConnectionIdsLarge = GenerateIds(20); _writtenAck = _protocol.WriteAck(42); _writtenGroupCommand = _protocol.WriteGroupCommand(_groupCommand); _writtenInvocationNoExclusions = _protocol.WriteInvocation(_methodName, _args, null); - _writtenInvocationSmallExclusions = _protocol.WriteInvocation(_methodName, _args, _excludedIdsSmall); - _writtenInvocationLargeExclusions = _protocol.WriteInvocation(_methodName, _args, _excludedIdsLarge); + _writtenInvocationSmallExclusions = _protocol.WriteInvocation(_methodName, _args, _excludedConnectionIdsSmall); + _writtenInvocationLargeExclusions = _protocol.WriteInvocation(_methodName, _args, _excludedConnectionIdsLarge); } [Benchmark] @@ -70,13 +70,13 @@ namespace Microsoft.AspNetCore.SignalR.Microbenchmarks [Benchmark] public void WriteInvocationSmallExclusions() { - _protocol.WriteInvocation(_methodName, _args, _excludedIdsSmall); + _protocol.WriteInvocation(_methodName, _args, _excludedConnectionIdsSmall); } [Benchmark] public void WriteInvocationLargeExclusions() { - _protocol.WriteInvocation(_methodName, _args, _excludedIdsLarge); + _protocol.WriteInvocation(_methodName, _args, _excludedConnectionIdsLarge); } [Benchmark] diff --git a/samples/ChatSample/PresenceHubLifetimeManager.cs b/samples/ChatSample/PresenceHubLifetimeManager.cs index 5d587827d6..4ab7abffb8 100644 --- a/samples/ChatSample/PresenceHubLifetimeManager.cs +++ b/samples/ChatSample/PresenceHubLifetimeManager.cs @@ -143,9 +143,9 @@ namespace ChatSample return _wrappedHubLifetimeManager.SendAllAsync(methodName, args); } - public override Task SendAllExceptAsync(string methodName, object[] args, IReadOnlyList excludedIds) + public override Task SendAllExceptAsync(string methodName, object[] args, IReadOnlyList excludedConnectionIds) { - return _wrappedHubLifetimeManager.SendAllExceptAsync(methodName, args, excludedIds); + return _wrappedHubLifetimeManager.SendAllExceptAsync(methodName, args, excludedConnectionIds); } public override Task SendConnectionAsync(string connectionId, string methodName, object[] args) @@ -183,9 +183,9 @@ namespace ChatSample return _wrappedHubLifetimeManager.RemoveFromGroupAsync(connectionId, groupName); } - public override Task SendGroupExceptAsync(string groupName, string methodName, object[] args, IReadOnlyList excludedIds) + public override Task SendGroupExceptAsync(string groupName, string methodName, object[] args, IReadOnlyList excludedConnectionIds) { - return _wrappedHubLifetimeManager.SendGroupExceptAsync(groupName, methodName, args, excludedIds); + return _wrappedHubLifetimeManager.SendGroupExceptAsync(groupName, methodName, args, excludedConnectionIds); } public override Task SendUsersAsync(IReadOnlyList userIds, string methodName, object[] args) diff --git a/src/Microsoft.AspNetCore.SignalR.Core/DefaultHubLifetimeManager.cs b/src/Microsoft.AspNetCore.SignalR.Core/DefaultHubLifetimeManager.cs index fd66a23857..4a5da0f4e0 100644 --- a/src/Microsoft.AspNetCore.SignalR.Core/DefaultHubLifetimeManager.cs +++ b/src/Microsoft.AspNetCore.SignalR.Core/DefaultHubLifetimeManager.cs @@ -219,7 +219,7 @@ namespace Microsoft.AspNetCore.SignalR return Task.CompletedTask; } - public override Task SendGroupExceptAsync(string groupName, string methodName, object[] args, IReadOnlyList excludedIds) + public override Task SendGroupExceptAsync(string groupName, string methodName, object[] args, IReadOnlyList excludedConnectionIds) { if (groupName == null) { @@ -232,7 +232,7 @@ namespace Microsoft.AspNetCore.SignalR List tasks = null; SerializedHubMessage message = null; - SendToGroupConnections(methodName, args, group, connection => !excludedIds.Contains(connection.ConnectionId), ref tasks, ref message); + SendToGroupConnections(methodName, args, group, connection => !excludedConnectionIds.Contains(connection.ConnectionId), ref tasks, ref message); if (tasks != null) { @@ -271,9 +271,9 @@ namespace Microsoft.AspNetCore.SignalR return Task.CompletedTask; } - public override Task SendAllExceptAsync(string methodName, object[] args, IReadOnlyList excludedIds) + public override Task SendAllExceptAsync(string methodName, object[] args, IReadOnlyList excludedConnectionIds) { - return SendToAllConnections(methodName, args, connection => !excludedIds.Contains(connection.ConnectionId)); + return SendToAllConnections(methodName, args, connection => !excludedConnectionIds.Contains(connection.ConnectionId)); } public override Task SendConnectionsAsync(IReadOnlyList connectionIds, string methodName, object[] args) diff --git a/src/Microsoft.AspNetCore.SignalR.Core/DynamicHubClients.cs b/src/Microsoft.AspNetCore.SignalR.Core/DynamicHubClients.cs index 47ffdeae00..2f49cc9d2d 100644 --- a/src/Microsoft.AspNetCore.SignalR.Core/DynamicHubClients.cs +++ b/src/Microsoft.AspNetCore.SignalR.Core/DynamicHubClients.cs @@ -16,13 +16,13 @@ namespace Microsoft.AspNetCore.SignalR } public dynamic All => new DynamicClientProxy(_clients.All); - public dynamic AllExcept(IReadOnlyList excludedIds) => new DynamicClientProxy(_clients.AllExcept(excludedIds)); + public dynamic AllExcept(IReadOnlyList excludedConnectionIds) => new DynamicClientProxy(_clients.AllExcept(excludedConnectionIds)); public dynamic Caller => new DynamicClientProxy(_clients.Caller); public dynamic Client(string connectionId) => new DynamicClientProxy(_clients.Client(connectionId)); public dynamic Clients(IReadOnlyList connectionIds) => new DynamicClientProxy(_clients.Clients(connectionIds)); public dynamic Group(string groupName) => new DynamicClientProxy(_clients.Group(groupName)); public dynamic Groups(IReadOnlyList groupNames) => new DynamicClientProxy(_clients.Groups(groupNames)); - public dynamic GroupExcept(string groupName, IReadOnlyList excludedIds) => new DynamicClientProxy(_clients.GroupExcept(groupName, excludedIds)); + public dynamic GroupExcept(string groupName, IReadOnlyList excludedConnectionIds) => new DynamicClientProxy(_clients.GroupExcept(groupName, excludedConnectionIds)); public dynamic OthersInGroup(string groupName) => new DynamicClientProxy(_clients.OthersInGroup(groupName)); public dynamic Others => new DynamicClientProxy(_clients.Others); public dynamic User(string userId) => new DynamicClientProxy(_clients.User(userId)); diff --git a/src/Microsoft.AspNetCore.SignalR.Core/HubLifetimeManager.cs b/src/Microsoft.AspNetCore.SignalR.Core/HubLifetimeManager.cs index 07c94367db..588ec88230 100644 --- a/src/Microsoft.AspNetCore.SignalR.Core/HubLifetimeManager.cs +++ b/src/Microsoft.AspNetCore.SignalR.Core/HubLifetimeManager.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.SignalR public abstract Task SendAllAsync(string methodName, object[] args); - public abstract Task SendAllExceptAsync(string methodName, object[] args, IReadOnlyList excludedIds); + public abstract Task SendAllExceptAsync(string methodName, object[] args, IReadOnlyList excludedConnectionIds); public abstract Task SendConnectionAsync(string connectionId, string methodName, object[] args); @@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.SignalR public abstract Task SendGroupsAsync(IReadOnlyList groupNames, string methodName, object[] args); - public abstract Task SendGroupExceptAsync(string groupName, string methodName, object[] args, IReadOnlyList excludedIds); + public abstract Task SendGroupExceptAsync(string groupName, string methodName, object[] args, IReadOnlyList excludedConnectionIds); public abstract Task SendUserAsync(string userId, string methodName, object[] args); diff --git a/src/Microsoft.AspNetCore.SignalR.Core/Internal/Proxies.cs b/src/Microsoft.AspNetCore.SignalR.Core/Internal/Proxies.cs index 402b146afe..ccec126b3c 100644 --- a/src/Microsoft.AspNetCore.SignalR.Core/Internal/Proxies.cs +++ b/src/Microsoft.AspNetCore.SignalR.Core/Internal/Proxies.cs @@ -78,18 +78,18 @@ namespace Microsoft.AspNetCore.SignalR.Internal { private readonly string _groupName; private readonly HubLifetimeManager _lifetimeManager; - private readonly IReadOnlyList _excludedIds; + private readonly IReadOnlyList _excludedConnectionIds; - public GroupExceptProxy(HubLifetimeManager lifetimeManager, string groupName, IReadOnlyList excludedIds) + public GroupExceptProxy(HubLifetimeManager lifetimeManager, string groupName, IReadOnlyList excludedConnectionIds) { _lifetimeManager = lifetimeManager; _groupName = groupName; - _excludedIds = excludedIds; + _excludedConnectionIds = excludedConnectionIds; } public Task SendCoreAsync(string method, object[] args) { - return _lifetimeManager.SendGroupExceptAsync(_groupName, method, args, _excludedIds); + return _lifetimeManager.SendGroupExceptAsync(_groupName, method, args, _excludedConnectionIds); } } @@ -111,17 +111,17 @@ namespace Microsoft.AspNetCore.SignalR.Internal internal class AllClientsExceptProxy : IClientProxy where THub : Hub { private readonly HubLifetimeManager _lifetimeManager; - private readonly IReadOnlyList _excludedIds; + private readonly IReadOnlyList _excludedConnectionIds; - public AllClientsExceptProxy(HubLifetimeManager lifetimeManager, IReadOnlyList excludedIds) + public AllClientsExceptProxy(HubLifetimeManager lifetimeManager, IReadOnlyList excludedConnectionIds) { _lifetimeManager = lifetimeManager; - _excludedIds = excludedIds; + _excludedConnectionIds = excludedConnectionIds; } public Task SendCoreAsync(string method, object[] args) { - return _lifetimeManager.SendAllExceptAsync(method, args, _excludedIds); + return _lifetimeManager.SendAllExceptAsync(method, args, _excludedConnectionIds); } } diff --git a/src/Microsoft.AspNetCore.SignalR.Redis/Internal/RedisInvocation.cs b/src/Microsoft.AspNetCore.SignalR.Redis/Internal/RedisInvocation.cs index 7d7a963786..e9cedbd5b0 100644 --- a/src/Microsoft.AspNetCore.SignalR.Redis/Internal/RedisInvocation.cs +++ b/src/Microsoft.AspNetCore.SignalR.Redis/Internal/RedisInvocation.cs @@ -10,24 +10,24 @@ namespace Microsoft.AspNetCore.SignalR.Redis.Internal /// Gets a list of connections that should be excluded from this invocation. /// May be null to indicate that no connections are to be excluded. /// - public IReadOnlyList ExcludedIds { get; } + public IReadOnlyList ExcludedConnectionIds { get; } /// /// Gets the message serialization cache containing serialized payloads for the message. /// public SerializedHubMessage Message { get; } - public RedisInvocation(SerializedHubMessage message, IReadOnlyList excludedIds) + public RedisInvocation(SerializedHubMessage message, IReadOnlyList excludedConnectionIds) { Message = message; - ExcludedIds = excludedIds; + ExcludedConnectionIds = excludedConnectionIds; } - public static RedisInvocation Create(string target, object[] arguments, IReadOnlyList excludedIds = null) + public static RedisInvocation Create(string target, object[] arguments, IReadOnlyList excludedConnectionIds = null) { return new RedisInvocation( new SerializedHubMessage(new InvocationMessage(target, null, arguments)), - excludedIds); + excludedConnectionIds); } } } diff --git a/src/Microsoft.AspNetCore.SignalR.Redis/Internal/RedisProtocol.cs b/src/Microsoft.AspNetCore.SignalR.Redis/Internal/RedisProtocol.cs index 29d585c38d..98dcd8955f 100644 --- a/src/Microsoft.AspNetCore.SignalR.Redis/Internal/RedisProtocol.cs +++ b/src/Microsoft.AspNetCore.SignalR.Redis/Internal/RedisProtocol.cs @@ -34,9 +34,9 @@ namespace Microsoft.AspNetCore.SignalR.Redis.Internal // * A 7-bit variable length integer encodes the length in bytes, followed by the encoded string in UTF-8. public byte[] WriteInvocation(string methodName, object[] args) => - WriteInvocation(methodName, args, excludedIds: null); + WriteInvocation(methodName, args, excludedConnectionIds: null); - public byte[] WriteInvocation(string methodName, object[] args, IReadOnlyList excludedIds) + public byte[] WriteInvocation(string methodName, object[] args, IReadOnlyList excludedConnectionIds) { // Written as a MessagePack 'arr' containing at least these items: // * A MessagePack 'arr' of 'str's representing the excluded ids @@ -48,10 +48,10 @@ namespace Microsoft.AspNetCore.SignalR.Redis.Internal try { MessagePackBinary.WriteArrayHeader(writer, 2); - if (excludedIds != null && excludedIds.Count > 0) + if (excludedConnectionIds != null && excludedConnectionIds.Count > 0) { - MessagePackBinary.WriteArrayHeader(writer, excludedIds.Count); - foreach (var id in excludedIds) + MessagePackBinary.WriteArrayHeader(writer, excludedConnectionIds.Count); + foreach (var id in excludedConnectionIds) { MessagePackBinary.WriteString(writer, id); } @@ -125,7 +125,7 @@ namespace Microsoft.AspNetCore.SignalR.Redis.Internal ValidateArraySize(ref data, 2, "Invocation"); // Read excluded Ids - IReadOnlyList excludedIds = null; + IReadOnlyList excludedConnectionIds = null; var idCount = MessagePackUtil.ReadArrayHeader(ref data); if (idCount > 0) { @@ -135,12 +135,12 @@ namespace Microsoft.AspNetCore.SignalR.Redis.Internal ids[i] = MessagePackUtil.ReadString(ref data); } - excludedIds = ids; + excludedConnectionIds = ids; } // Read payload var message = ReadSerializedHubMessage(ref data); - return new RedisInvocation(message, excludedIds); + return new RedisInvocation(message, excludedConnectionIds); } public RedisGroupCommand ReadGroupCommand(ReadOnlyMemory data) diff --git a/src/Microsoft.AspNetCore.SignalR.Redis/RedisHubLifetimeManager.cs b/src/Microsoft.AspNetCore.SignalR.Redis/RedisHubLifetimeManager.cs index 911c528bfd..6c471ce7f8 100644 --- a/src/Microsoft.AspNetCore.SignalR.Redis/RedisHubLifetimeManager.cs +++ b/src/Microsoft.AspNetCore.SignalR.Redis/RedisHubLifetimeManager.cs @@ -112,9 +112,9 @@ namespace Microsoft.AspNetCore.SignalR.Redis return PublishAsync(_channels.All, message); } - public override Task SendAllExceptAsync(string methodName, object[] args, IReadOnlyList excludedIds) + public override Task SendAllExceptAsync(string methodName, object[] args, IReadOnlyList excludedConnectionIds) { - var message = _protocol.WriteInvocation(methodName, args, excludedIds); + var message = _protocol.WriteInvocation(methodName, args, excludedConnectionIds); return PublishAsync(_channels.All, message); } @@ -148,14 +148,14 @@ namespace Microsoft.AspNetCore.SignalR.Redis return PublishAsync(_channels.Group(groupName), message); } - public override async Task SendGroupExceptAsync(string groupName, string methodName, object[] args, IReadOnlyList excludedIds) + public override async Task SendGroupExceptAsync(string groupName, string methodName, object[] args, IReadOnlyList excludedConnectionIds) { if (groupName == null) { throw new ArgumentNullException(nameof(groupName)); } - var message = _protocol.WriteInvocation(methodName, args, excludedIds); + var message = _protocol.WriteInvocation(methodName, args, excludedConnectionIds); await PublishAsync(_channels.Group(groupName), message); } @@ -388,7 +388,7 @@ namespace Microsoft.AspNetCore.SignalR.Redis foreach (var connection in _connections) { - if (invocation.ExcludedIds == null || !invocation.ExcludedIds.Contains(connection.ConnectionId)) + if (invocation.ExcludedConnectionIds == null || !invocation.ExcludedConnectionIds.Contains(connection.ConnectionId)) { tasks.Add(connection.WriteAsync(invocation.Message).AsTask()); } @@ -487,7 +487,7 @@ namespace Microsoft.AspNetCore.SignalR.Redis var tasks = new List(); foreach (var groupConnection in group.Connections) { - if (invocation.ExcludedIds?.Contains(groupConnection.ConnectionId) == true) + if (invocation.ExcludedConnectionIds?.Contains(groupConnection.ConnectionId) == true) { continue; } diff --git a/test/Microsoft.AspNetCore.SignalR.Redis.Tests/RedisHubLifetimeManagerTests.cs b/test/Microsoft.AspNetCore.SignalR.Redis.Tests/RedisHubLifetimeManagerTests.cs index 51963a4107..7335158912 100644 --- a/test/Microsoft.AspNetCore.SignalR.Redis.Tests/RedisHubLifetimeManagerTests.cs +++ b/test/Microsoft.AspNetCore.SignalR.Redis.Tests/RedisHubLifetimeManagerTests.cs @@ -137,8 +137,8 @@ namespace Microsoft.AspNetCore.SignalR.Redis.Tests await manager.AddToGroupAsync(connection1.ConnectionId, "gunit").OrTimeout(); await manager.AddToGroupAsync(connection2.ConnectionId, "gunit").OrTimeout(); - var excludedIds = new List { client2.Connection.ConnectionId }; - await manager.SendGroupExceptAsync("gunit", "Hello", new object[] { "World" }, excludedIds).OrTimeout(); + var excludedConnectionIds = new List { client2.Connection.ConnectionId }; + await manager.SendGroupExceptAsync("gunit", "Hello", new object[] { "World" }, excludedConnectionIds).OrTimeout(); await AssertMessageAsync(client1); Assert.Null(client2.TryRead()); diff --git a/test/Microsoft.AspNetCore.SignalR.Redis.Tests/RedisProtocolTests.cs b/test/Microsoft.AspNetCore.SignalR.Redis.Tests/RedisProtocolTests.cs index 0360928004..7d1a4aa3e4 100644 --- a/test/Microsoft.AspNetCore.SignalR.Redis.Tests/RedisProtocolTests.cs +++ b/test/Microsoft.AspNetCore.SignalR.Redis.Tests/RedisProtocolTests.cs @@ -138,7 +138,7 @@ namespace Microsoft.AspNetCore.SignalR.Redis.Tests var decoded = protocol.ReadInvocation(testData.Encoded); - Assert.Equal(testData.Decoded.ExcludedIds, decoded.ExcludedIds); + Assert.Equal(testData.Decoded.ExcludedConnectionIds, decoded.ExcludedConnectionIds); // Verify the deserialized object has the necessary serialized forms foreach (var hubProtocol in hubProtocols) @@ -159,7 +159,7 @@ namespace Microsoft.AspNetCore.SignalR.Redis.Tests // Actual invocation doesn't matter because we're using a dummy hub protocol. // But the dummy protocol will check that we gave it the test message to make sure everything flows through properly. - var encoded = protocol.WriteInvocation(_testMessage.Target, _testMessage.Arguments, testData.Decoded.ExcludedIds); + var encoded = protocol.WriteInvocation(_testMessage.Target, _testMessage.Arguments, testData.Decoded.ExcludedConnectionIds); Assert.Equal(testData.Encoded, encoded); } diff --git a/test/Microsoft.AspNetCore.SignalR.Tests/ClientProxyTests.cs b/test/Microsoft.AspNetCore.SignalR.Tests/ClientProxyTests.cs index 2381590e12..373e5af633 100644 --- a/test/Microsoft.AspNetCore.SignalR.Tests/ClientProxyTests.cs +++ b/test/Microsoft.AspNetCore.SignalR.Tests/ClientProxyTests.cs @@ -107,7 +107,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests var o = new Mock>(); o.Setup(m => m.SendGroupExceptAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>())) - .Callback>((groupName, methodName, args, excludedIds) => { resultArgs = args; }) + .Callback>((groupName, methodName, args, excludedConnectionIds) => { resultArgs = args; }) .Returns(Task.CompletedTask); var proxy = new GroupExceptProxy(o.Object, string.Empty, new List()); @@ -149,7 +149,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests var o = new Mock>(); o.Setup(m => m.SendAllExceptAsync(It.IsAny(), It.IsAny(), It.IsAny>())) - .Callback>((methodName, args, excludedIds) => { resultArgs = args; }) + .Callback>((methodName, args, excludedConnectionIds) => { resultArgs = args; }) .Returns(Task.CompletedTask); var proxy = new AllClientsExceptProxy(o.Object, new List()); diff --git a/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTestUtils/Hubs.cs b/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTestUtils/Hubs.cs index ecfac7d379..0de1b849bf 100644 --- a/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTestUtils/Hubs.cs +++ b/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTestUtils/Hubs.cs @@ -48,9 +48,9 @@ namespace Microsoft.AspNetCore.SignalR.Tests return Clients.Group(groupName).SendAsync("Send", message); } - public Task GroupExceptSendMethod(string groupName, string message, IReadOnlyList excludedIds) + public Task GroupExceptSendMethod(string groupName, string message, IReadOnlyList excludedConnectionIds) { - return Clients.GroupExcept(groupName, excludedIds).SendAsync("Send", message); + return Clients.GroupExcept(groupName, excludedConnectionIds).SendAsync("Send", message); } public Task SendToMultipleGroups(string message, IReadOnlyList groupNames) @@ -137,9 +137,9 @@ namespace Microsoft.AspNetCore.SignalR.Tests { } - public Task SendToAllExcept(string message, IReadOnlyList excludedIds) + public Task SendToAllExcept(string message, IReadOnlyList excludedConnectionIds) { - return Clients.AllExcept(excludedIds).SendAsync("Send", message); + return Clients.AllExcept(excludedConnectionIds).SendAsync("Send", message); } public bool HasHttpContext() @@ -212,9 +212,9 @@ namespace Microsoft.AspNetCore.SignalR.Tests return Clients.Group(groupName).Send(message); } - public Task GroupExceptSendMethod(string groupName, string message, IReadOnlyList excludedIds) + public Task GroupExceptSendMethod(string groupName, string message, IReadOnlyList excludedConnectionIds) { - return Clients.GroupExcept(groupName, excludedIds).Send(message); + return Clients.GroupExcept(groupName, excludedConnectionIds).Send(message); } public Task SendToOthersInGroup(string groupName, string message) @@ -232,9 +232,9 @@ namespace Microsoft.AspNetCore.SignalR.Tests return Clients.All.Broadcast(message); } - public Task SendToAllExcept(string message, IReadOnlyList excludedIds) + public Task SendToAllExcept(string message, IReadOnlyList excludedConnectionIds) { - return Clients.AllExcept(excludedIds).Send(message); + return Clients.AllExcept(excludedConnectionIds).Send(message); } public Task SendToOthers(string message) @@ -298,9 +298,9 @@ namespace Microsoft.AspNetCore.SignalR.Tests return Clients.Group(groupName).Send(message); } - public Task GroupExceptSendMethod(string groupName, string message, IReadOnlyList excludedIds) + public Task GroupExceptSendMethod(string groupName, string message, IReadOnlyList excludedConnectionIds) { - return Clients.GroupExcept(groupName, excludedIds).Send(message); + return Clients.GroupExcept(groupName, excludedConnectionIds).Send(message); } public Task SendToMultipleGroups(string message, IReadOnlyList groupNames) @@ -318,9 +318,9 @@ namespace Microsoft.AspNetCore.SignalR.Tests return Clients.All.Broadcast(message); } - public Task SendToAllExcept(string message, IReadOnlyList excludedIds) + public Task SendToAllExcept(string message, IReadOnlyList excludedConnectionIds) { - return Clients.AllExcept(excludedIds).Send(message); + return Clients.AllExcept(excludedConnectionIds).Send(message); } public Task SendToOthers(string message) diff --git a/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.cs b/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.cs index e84cc14a5a..9076587e92 100644 --- a/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.cs +++ b/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.cs @@ -1156,9 +1156,9 @@ namespace Microsoft.AspNetCore.SignalR.Tests await firstClient.InvokeAsync(nameof(MethodHub.GroupAddMethod), "testGroup").OrTimeout(); await secondClient.InvokeAsync(nameof(MethodHub.GroupAddMethod), "testGroup").OrTimeout(); - var excludedIds = new List { firstClient.Connection.ConnectionId }; + var excludedConnectionIds = new List { firstClient.Connection.ConnectionId }; - await firstClient.SendInvocationAsync("GroupExceptSendMethod", "testGroup", "test", excludedIds).OrTimeout(); + await firstClient.SendInvocationAsync("GroupExceptSendMethod", "testGroup", "test", excludedConnectionIds).OrTimeout(); // check that 'secondConnection' has received the group send var hubMessage = await secondClient.ReadAsync().OrTimeout();