public ContestUpdateFactory( IContestStore contestStore, IConnectedClientStore connectedClients) { _contestStore = contestStore; _connectedClients = connectedClients; }
public UpdateFactory( TypingDuelsState state, IConnectedClientStore connectedClients) { _state = state; _connectedClients = connectedClients; }
public UpdateFactory( IPlayerRepository playerRepository, IConnectedClientStore connectedClients) { _playerRepository = playerRepository; _connectedClients = connectedClients; }
public PlayerPersistenceFactory( ILocationStore locationStore, IRoadStore roadStore, IConnectedClientStore connectedClientStore) { _locationStore = locationStore; _roadStore = roadStore; _connectedClientStore = connectedClientStore; }
public TypeMessageHandler( TypingDuelsState state, IConnectedClientStore connectedClients, TypedDebouncer debouncer) { _state = state; _connectedClients = connectedClients; _debouncer = debouncer; }
public ConnectionHandler( ILogger <ConnectionHandler> logger, IConnectionInitializer connectionInitializer, IConnectedClientStore connectedClients, IMessageDispatcher messageDispatcher, IUpdateDetector updateDetector, IUpdater updater) { _logger = logger; _connectionInitializer = connectionInitializer; _connectedClients = connectedClients; _messageDispatcher = messageDispatcher; _updateDetector = updateDetector; _updater = updater; }
public ConnectionHandler( ILogger <ConnectionHandler> logger, IConnectionInitializer connectionInitializer, IConnectedClientStore connectedClients, IMessageDispatcher messageDispatcher, IQueryDispatcher queryDispatcher, IUpdateDetector updateDetector, IMessageTypeCache messageTypeCache, IEnumerable <IConnectedClientInitializer> connectedClientInitializers, IUpdater updater) { _logger = logger; _connectionInitializer = connectionInitializer; _connectedClients = connectedClients; _messageDispatcher = messageDispatcher; _queryDispatcher = queryDispatcher; _updateDetector = updateDetector; _messageTypeCache = messageTypeCache; _connectedClientInitializers = connectedClientInitializers; _updater = updater; }
public DisconnectHandler(IConnectedClientStore store) { _store = store; }
public BroadcastMessageHandler(IConnectedClientStore connectedClients) { _connectedClients = connectedClients; }
/// <summary> /// Sends message to all the clients in specified list of groups. /// </summary> /// <param name="store">ConnectedClientStore instance.</param> /// <param name="message">Message to send to all the clients in given group.</param> /// <param name="groups">The list of groups to which the message will be sent.</param> /// <param name="cancellationToken">Cancellation token.</param> /// <returns></returns> public static ValueTask SendAsync(this IConnectedClientStore store, object message, IEnumerable <string> groups, CancellationToken cancellationToken) => AsyncHelpers.WhenAll(store.FindInGroups(groups) .Select(x => x.Connection.SendAsync(message, cancellationToken)));
/// <summary> /// Finds all clients that are in given messaging group. /// </summary> /// <param name="store">ConnectedClientStore instance.</param> /// <param name="groups">Collection of messaging groups to search for.</param> /// <returns>Collection of clients that are present in requested group.</returns> public static IEnumerable <ConnectedClient> FindInGroups(this IConnectedClientStore store, params string[] groups) => store.FindInGroups(groups);
/// <summary> /// Gets a value indicating whether given client is present in the store /// (if it's connected - it will be present in the store). /// </summary> /// <param name="store">ConnectedClientStore instance.</param> /// <param name="clientId">Connected client identity.</param> /// <returns>A value indicating whether given client is present in the store.</returns> public static bool IsClientConnected(this IConnectedClientStore store, string clientId) => store.Find(clientId) != null;
public AnnounceHandler(IConnectedClientStore connectedClients) { _connectedClients = connectedClients; }