public ClientController(ActionInvoker actionInvoker, WebSocketServerBase server, DataContext dataContext, JsonMapperManager jsonMapperManager, [Named("DeviceNotification")] DeviceSubscriptionManager subscriptionManager, CommandSubscriptionManager commandSubscriptionManager, MessageBus messageBus) : base(actionInvoker, server, dataContext, jsonMapperManager) { _subscriptionManager = subscriptionManager; _commandSubscriptionManager = commandSubscriptionManager; _messageBus = messageBus; }
public DeviceController(ActionInvoker actionInvoker, WebSocketServerBase server, DataContext dataContext, JsonMapperManager jsonMapperManager, [Named("DeviceCommand")] DeviceSubscriptionManager subscriptionManager, MessageBus messageBus, IMessageManager messageManager, DeviceService deviceService) : base(actionInvoker, server, dataContext, jsonMapperManager) { _subscriptionManager = subscriptionManager; _messageBus = messageBus; _messageManager = messageManager; _deviceService = deviceService; _deviceMapper = jsonMapperManager.GetMapper<Device>(); }
public WebSocketServiceImpl(WebSocketServerBase server, Router router) { _server = server; _server.MessageReceived += (s, e) => router.RouteRequest(e.Connection, e.Message); _server.ConnectionClosed += (s, e) => router.CleanupConnection(e.Connection); }