2 writes to Clients
Microsoft.AspNetCore.Components.Server.Tests (1)
Circuits\ComponentHubTest.cs (1)
129hub.Clients = mockCaller.Object;
Microsoft.AspNetCore.SignalR.Core (1)
Internal\DefaultHubDispatcher.cs (1)
628hub.Clients = new HubCallerClients(_hubContext.Clients, connection.ConnectionId, connection.ActiveInvocationLimit) { InvokeAllowed = invokeAllowed };
61 references to Clients
JwtSample (1)
Broadcaster.cs (1)
14Clients.All.SendAsync("Message", sender, message);
Microsoft.AspNetCore.Components.Server (9)
ComponentHub.cs (9)
91await NotifyClientError(Clients.Caller, $"The circuit host '{circuitHost.CircuitId}' has already been initialized."); 107await NotifyClientError(Clients.Caller, "The uris provided are invalid."); 115await NotifyClientError(Clients.Caller, "The list of component records is not valid."); 122var circuitClient = new CircuitClientProxy(Clients.Caller, Context.ConnectionId); 157await NotifyClientError(Clients.Caller, "The circuit failed to initialize."); 177await NotifyClientError(Clients.Caller, "The list of component operations is not valid."); 203Clients.Caller, 352await NotifyClientError(Clients.Caller, "Circuit has been shut down due to error."); 361await NotifyClientError(Clients.Caller, "Circuit not initialized.");
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (4)
Hubs.cs (4)
31await Clients.Client(Context.ConnectionId).SendAsync("Echo", message); 36await Clients.Client(Context.ConnectionId).SendAsync("NoClientHandler"); 111await Clients.All.SendAsync("Foo", Unserializable.Create()); 304return Clients.Caller.SendAsync("NewProtocolMethodClient");
Microsoft.AspNetCore.SignalR.Client.Tests (1)
TestServerTests.cs (1)
118return Clients.All.SendAsync("Echo", message);
Microsoft.AspNetCore.SignalR.Core (5)
DynamicHub.cs (1)
22_clients = new DynamicHubClients(base.Clients);
Hub`T.cs (1)
25_clients = new TypedHubClients<T>(base.Clients);
Internal\DefaultHubDispatcher.cs (3)
363Debug.Assert(hub.Clients is HubCallerClients); 367((HubCallerClients)hub.Clients).TrySetSemaphoreReleased(); 461if (hub?.Clients is HubCallerClients hubCallerClients)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
EchoHub.cs (2)
18return Clients.Group(groupName).SendAsync("Echo", message); 23return Clients.User(userName).SendAsync("Echo", message);
Microsoft.AspNetCore.SignalR.Tests (27)
HubConnectionHandlerTestUtils\Hubs.cs (27)
25return Clients.User(userId).SendAsync("Send", message); 30return Clients.Users(userIds).SendAsync("Send", message); 35return Clients.Client(connectionId).SendAsync("Send", message); 40return Clients.Clients(connectionIds).SendAsync("Send", message); 50return Clients.Group(groupName).SendAsync("Send", message); 55return Clients.GroupExcept(groupName, excludedConnectionIds).SendAsync("Send", message); 60return Clients.Groups(groupNames).SendAsync("Send", message); 65return Clients.OthersInGroup(groupName).SendAsync("Send", message); 70return Clients.All.SendAsync("Broadcast", message); 75return Clients.All.SendAsync("Broadcast", new Result { Message = "test", paramName = "param" }); 80return Clients.All.SendAsync("Array", new[] { 1, 2, 3 }); 125return Clients.Client(Context.ConnectionId).SendAsync("Send", new { }); 164return Clients.AllExcept(excludedConnectionIds).SendAsync("Send", message); 174return Clients.Others.SendAsync("Send", message); 179return Clients.Caller.SendAsync("Send", message); 184return Clients.Caller.SendAsync("Send", new SelfRef()); 340var sum = await Clients.Caller.InvokeAsync<int>("Sum", num, cancellationToken: default); 346var caller = Clients.Caller; 364var sum = await Clients.Caller.InvokeAsync<int>("Sum", 1, cancellationToken: default); 370var sum = await Clients.Caller.InvokeAsync<int>("Sum", 1, cancellationToken: default); 985await Clients.All.SendAsync("Send", $"{Context.ConnectionId} joined"); 1281return Clients.Caller.SendAsync("Send", new SelfRef()); 1286return Clients.All.SendAsync("Send", new SelfRef()); 1313await Clients.Caller.InvokeAsync<int>("Test", cancellationToken: default); 1321await Clients.Caller.InvokeAsync<int>("Test", cancellationToken: default); 1336_service.SetCaller(Clients.Caller); 1464await Clients.Client(id).SendAsync("Test", 1);
SignalR.Client.FunctionalTestApp (2)
TestHub.cs (2)
52return Clients.Client(Context.ConnectionId).SendAsync("Message", message); 57return Clients.Client(Context.ConnectionId).SendAsync("CustomObject", customObject);
SignalRSamples (10)
Hubs\Chat.cs (10)
13return Clients.All.SendAsync("Send", $"{name} joined the chat"); 19return Clients.All.SendAsync("Send", $"{name} left the chat"); 24return Clients.All.SendAsync("Send", $"{name}: {message}"); 29return Clients.Others.SendAsync("Send", $"{name}: {message}"); 34return Clients.Client(connectionId).SendAsync("Send", $"Private message from {name}: {message}"); 39return Clients.Group(groupName).SendAsync("Send", $"{name}@{groupName}: {message}"); 44return Clients.OthersInGroup(groupName).SendAsync("Send", $"{name}@{groupName}: {message}"); 51await Clients.Group(groupName).SendAsync("Send", $"{name} joined {groupName}"); 56await Clients.Group(groupName).SendAsync("Send", $"{name} left {groupName}"); 63return Clients.Caller.SendAsync("Send", $"{name}: {message}");