public MqttClient(IMqttClientAdapterFactory channelFactory, IMqttNetLogger logger) { _adapterFactory = channelFactory ?? throw new ArgumentNullException(nameof(channelFactory)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _packetDispatcher = new MqttPacketDispatcher(logger); }
public LowLevelMqttClient(IMqttClientAdapterFactory clientAdapterFactory, IMqttNetLogger logger) { _clientAdapterFactory = clientAdapterFactory ?? throw new ArgumentNullException(nameof(clientAdapterFactory)); _rootLogger = logger ?? throw new ArgumentNullException(nameof(logger)); _logger = logger.WithSource(nameof(LowLevelMqttClient)); }
public IMqttClient CreateMqttClient(IMqttClientAdapterFactory clientAdapterFactory) { if (clientAdapterFactory == null) { throw new ArgumentNullException(nameof(clientAdapterFactory)); } return(new MqttClient(clientAdapterFactory, DefaultLogger)); }
public IMqttClient CreateMqttClient(IMqttClientAdapterFactory adapterFactory) { if (adapterFactory == null) { throw new ArgumentNullException(nameof(adapterFactory)); } return(new MqttClient(adapterFactory, new MqttNetLogger())); }
public MqttClient(IMqttClientAdapterFactory channelFactory, IMqttNetLogger logger) { if (logger == null) { throw new ArgumentNullException(nameof(logger)); } _adapterFactory = channelFactory ?? throw new ArgumentNullException(nameof(channelFactory)); _logger = logger.CreateScopedLogger(nameof(MqttClient)); }
public LowLevelMqttClient(IMqttClientAdapterFactory clientAdapterFactory, IMqttNetLogger logger) { _clientAdapterFactory = clientAdapterFactory ?? throw new ArgumentNullException(nameof(clientAdapterFactory)); if (logger is null) { throw new ArgumentNullException(nameof(logger)); } _logger = logger.CreateScopedLogger(nameof(LowLevelMqttClient)); }
public ILowLevelMqttClient CreateLowLevelMqttClient(IMqttNetLogger logger, IMqttClientAdapterFactory clientAdapterFactory) { if (logger == null) { throw new ArgumentNullException(nameof(logger)); } if (clientAdapterFactory == null) { throw new ArgumentNullException(nameof(clientAdapterFactory)); } return(new LowLevelMqttClient(_clientAdapterFactory, logger)); }
public IMqttClient CreateMqttClient(IMqttNetLogger logger, IMqttClientAdapterFactory mqttClientAdapterFactory) { if (logger == null) { throw new ArgumentNullException(nameof(logger)); } if (mqttClientAdapterFactory == null) { throw new ArgumentNullException(nameof(mqttClientAdapterFactory)); } return(new MqttClient(mqttClientAdapterFactory, logger)); }
public CollectionMqttClient(IMqttClientAdapterFactory factory, IMqttNetLogger mqttLogger, ISendProtocolFactory sendProtocolFactory, IOptionsMonitor <Setting> kj1012Setting, ILogger <CollectionMqttClient> logger) : base(factory, mqttLogger) { _sendProtocolFactory = sendProtocolFactory; _logger = logger; _kj1012Setting = kj1012Setting; Connected += MqttClient_Connected; Disconnected += MqttClient_Disconnected; ApplicationMessageReceived += MqttClient_ApplicationMessageReceived;; }
public IMqttFactory UseClientAdapterFactory(IMqttClientAdapterFactory clientAdapterFactory) { _clientAdapterFactory = clientAdapterFactory ?? throw new ArgumentNullException(nameof(clientAdapterFactory)); return(this); }
public MqttFactory(IMqttNetLogger logger) { DefaultLogger = logger ?? throw new ArgumentNullException(nameof(logger)); _clientAdapterFactory = new MqttClientAdapterFactory(logger); }
public MqttClient(IMqttClientAdapterFactory channelFactory, IMqttNetLogger logger) { _adapterFactory = channelFactory ?? throw new ArgumentNullException(nameof(channelFactory)); _rootLogger = logger ?? throw new ArgumentNullException(nameof(logger)); _logger = logger.WithSource(nameof(MqttClient)); }