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));
 }
Exemple #3
0
 public MqttCommandAdapter(IMqttAdapterService mqttAdapterService, IMqttAdapterDbService mqttAdapterDbService)
 {
     _mqttAdapterService   = mqttAdapterService ?? throw new ArgumentNullException(nameof(mqttAdapterService));
     _mqttAdapterDbService = mqttAdapterDbService ?? throw new ArgumentNullException(nameof(mqttAdapterDbService));
 }