Example #1
0
 public SonoffAdapter(
     SonoffInitializationArgument initializationArguments,
     IMessageBroker messageBroker,
     IMqttAdapterDbService mqttAdapterDbService,
     IControllerStateService controllerStateService,
     IModelFactory modelFactory)
 {
     _initializationArguments = initializationArguments;
     _messageBroker           = messageBroker;
     _mqttAdapterDbService    = mqttAdapterDbService ?? throw new ArgumentNullException(nameof(mqttAdapterDbService));
     _controllerStateService  = controllerStateService ?? throw new ArgumentNullException(nameof(controllerStateService));
     _modelFactory            = modelFactory ?? throw new ArgumentNullException(nameof(modelFactory));
 }
 public MqttAdapterFactory(
     IMessageBroker messageBroker,
     IJsonSerializerService jsonSerializerService,
     IEncodingService encodingService,
     IMqttAdapterDbService mqttAdapterDbService,
     IControllerStateService controllerStateService,
     IModelFactory modelFactory)
 {
     _messageBroker          = messageBroker;
     _jsonSerializerService  = jsonSerializerService;
     _encodingService        = encodingService;
     _mqttAdapterDbService   = mqttAdapterDbService ?? throw new ArgumentNullException(nameof(mqttAdapterDbService));
     _controllerStateService = controllerStateService ?? throw new ArgumentNullException(nameof(controllerStateService));
     _modelFactory           = modelFactory ?? throw new ArgumentNullException(nameof(modelFactory));
 }
Example #3
0
 public StateRepository(IRepositoryService repositoryService, IControllerStateService controllerStateService)
 {
     _repositoryService      = repositoryService ?? throw new System.ArgumentNullException(nameof(repositoryService));
     _controllerStateService = controllerStateService ?? throw new System.ArgumentNullException(nameof(controllerStateService));
 }