예제 #1
0
 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;
 }
예제 #2
0
        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>();
        }
예제 #3
0
 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);
 }