protected ControllerBase(ActionInvoker actionInvoker, WebSocketServerBase server, DataContext dataContext, JsonMapperManager jsonMapperManager) : base(actionInvoker, server) { _dataContext = dataContext; _commandMapper = jsonMapperManager.GetMapper <DeviceCommand>(); _notificationMapper = jsonMapperManager.GetMapper <DeviceNotification>(); }
public HostServiceImpl(WebSocketServerBase server) { _server = server; _server.ConnectionOpened += OnConnectionOpened; _server.MessageReceived += OnMessageReceived; _server.PingReceived += OnPingReceived; _server.ConnectionClosed += OnConnectionClosed; _managerServiceHost = new ServiceHost(this); }
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 Application(WebSocketServerBase server, ServiceConfigurationSection configuration, ApplicationConfiguration appConfig) { _log = LogManager.GetLogger(GetType()); _server = server; _hostPipeName = string.Format(configuration.HostPipeName, appConfig.Host); _appPipeName = string.Format(configuration.AppPipeName, appConfig.Host); _terminateTimeout = configuration.ApplicationTerminateTimeout; _host = appConfig.Host; _exePath = appConfig.ExePath; _commandLineArgs = appConfig.CommandLineArgs; _userName = appConfig.UserName; _userPassword = appConfig.UserPassword; _state = ApplicationState.Inactive; _inactiveStartTime = DateTime.MaxValue; }
public SelfHostServiceImpl(DeviceHiveConfiguration configuration, WebSocketServerBase server, Router router) { if (configuration == null) { throw new ArgumentNullException("configuration"); } if (server == null) { throw new ArgumentNullException("server"); } if (router == null) { throw new ArgumentNullException("router"); } _configuration = configuration; _server = server; _server.ConnectionOpened += (s, e) => router.HandleNewConnection(e.Connection); _server.MessageReceived += (s, e) => router.RouteRequest(e.Connection, e.Message); _server.PingReceived += (s, e) => router.RoutePing(e.Connection); _server.ConnectionClosed += (s, e) => router.CleanupConnection(e.Connection); }
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); }
protected ControllerBase(ActionInvoker actionInvoker, WebSocketServerBase server) { _actionInvoker = actionInvoker; _server = server; }