public DiskController(IQuery query, ISelectorStorage selectorStorage, IWebSocketConnectionsService connectionsService, INotificationQuery notificationQuery) { _query = query; _iStorage = selectorStorage.Get(SelectorStorage.StorageServices.SubPath); _connectionsService = connectionsService; _notificationQuery = notificationQuery; }
public ThumbnailGenerationController(ISelectorStorage selectorStorage, IQuery query, IWebLogger logger, IWebSocketConnectionsService connectionsService) { _selectorStorage = selectorStorage; _query = query; _logger = logger; _connectionsService = connectionsService; }
internal SyncWatcherConnector(AppSettings appSettings, ISynchronize synchronize, IWebSocketConnectionsService connectionsService, IQuery query, IWebLogger logger, TelemetryClient?telemetryClient) { _appSettings = appSettings; _synchronize = synchronize; _connectionsService = connectionsService; _query = query; _logger = logger; _telemetryClient = telemetryClient; }
public ManualBackgroundSyncService(ISynchronize synchronize, IQuery query, IWebSocketConnectionsService connectionsService, IMemoryCache cache, IWebLogger logger, IUpdateBackgroundTaskQueue bgTaskQueue, IServiceScopeFactory scopeFactory) { _synchronize = synchronize; _connectionsService = connectionsService; _query = query; _cache = cache; _logger = logger; _bgTaskQueue = bgTaskQueue; _scopeFactory = scopeFactory; }
public void Configure(IApplicationBuilder app, IHostingEnvironment env, IServiceProvider serviceProvider) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } ITextWebSocketSubprotocol textWebSocketSubprotocol = new PlainTextWebSocketSubprotocol(); app.UseStaticFiles() .UseWebSockets() .MapWebSocketConnections("/socket", new WebSocketConnectionsOptions { SupportedSubProtocols = new List <ITextWebSocketSubprotocol> { new JsonWebSocketSubprotocol(), textWebSocketSubprotocol }, DefaultSubProtocol = textWebSocketSubprotocol }) .Run(async(context) => { await context.Response.WriteAsync("-- Demo.AspNetCore.WebSocket --"); }); // Only for demo purposes, don't do this kind of thing to your production IWebSocketConnectionsService webSocketConnectionsService = serviceProvider.GetService <IWebSocketConnectionsService>(); System.Threading.Thread webSocketHeartbeatThread = new System.Threading.Thread(new System.Threading.ThreadStart(() => { while (true) { webSocketConnectionsService.SendToAllAsync("Demo.AspNetCore.WebSockets Heartbeat", System.Threading.CancellationToken.None).Wait(); System.Threading.Thread.Sleep(5000); } })); webSocketHeartbeatThread.Start(); }
public WebSocketConnectionsMiddleware(RequestDelegate next, WebSocketConnectionsOptions options, IWebSocketConnectionsService connectionsService, IWebSocketCompressionService compressionService) { _options = options ?? throw new ArgumentNullException(nameof(options)); _connectionsService = connectionsService ?? throw new ArgumentNullException(nameof(connectionsService)); _compressionService = compressionService ?? throw new ArgumentNullException(nameof(compressionService)); }
public RealtimeConnectionsService(IWebSocketConnectionsService webSocketConnectionsService, INotificationQuery notificationQuery, IWebLogger logger) { _webSocketConnectionsService = webSocketConnectionsService; _notificationQuery = notificationQuery; _logger = logger; }
public ThreadStatsChangefeedBackgroundService(IThreadStatsChangefeedDbService threadStatsChangefeedDbService, IServerSentEventsService serverSentEventsService, IWebSocketConnectionsService webSocketConnectionsService) { _threadStatsChangefeedDbService = threadStatsChangefeedDbService; _serverSentEventsService = serverSentEventsService; _webSocketConnectionsService = webSocketConnectionsService; }
public HeartbeatService(IWebSocketConnectionsService webSocketConnectionsService) { _webSocketConnectionsService = webSocketConnectionsService; }
public WebSocketConnectionsMiddleware(RequestDelegate next, IWebSocketConnectionsService connectionsService) { _next = next; _connectionsService = connectionsService ?? throw new ArgumentNullException(nameof(connectionsService)); }
public HeartbeatService(IWebSocketConnectionsService connectionsService) { _connectionsService = connectionsService; }