public MqttAdapter(IMqttClientOptions options, IMqttClientFactory factory, RetryOptions retryOptions, IMqttAnnounceBuilder announceBuilder, ILogger <MqttAdapter> logger) { if (factory == null) { throw new ArgumentNullException(nameof(factory)); } this.options = options ?? throw new ArgumentNullException(nameof(options)); this.retryOptions = retryOptions ?? throw new ArgumentNullException(nameof(retryOptions)); this.announceBuilder = announceBuilder ?? throw new ArgumentNullException(nameof(announceBuilder)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); client = factory.CreateMqttClient(); client.UseDisconnectedHandler(HandleClientDisconnected); }
public MqttOptions(IMqttClientOptions clientOptions, RetryOptions retryOptions) { ClientOptions = clientOptions; RetryOptions = retryOptions; }