Exemplo n.º 1
0
        public MqttClient(IMqttClientAdapterFactory channelFactory, IMqttNetLogger logger)
        {
            _adapterFactory = channelFactory ?? throw new ArgumentNullException(nameof(channelFactory));
            _logger         = logger ?? throw new ArgumentNullException(nameof(logger));

            _packetDispatcher = new MqttPacketDispatcher(logger);
        }
Exemplo n.º 2
0
 public MqttClient(IMqttCommunicationAdapterFactory communicationAdapterFactory, ILogger <MqttClient> logger, MqttPacketDispatcher packetDispatcher)
 {
     _communicationAdapterFactory = communicationAdapterFactory ?? throw new ArgumentNullException(nameof(communicationAdapterFactory));
     _logger           = logger ?? throw new ArgumentNullException(nameof(logger));
     _packetDispatcher = packetDispatcher ?? throw new ArgumentNullException(nameof(packetDispatcher));
 }