2020-11-09 18:12:07 +01:00
|
|
|
|
using MQTTnet.Client.Options;
|
|
|
|
|
using System;
|
|
|
|
|
|
2020-12-03 18:52:25 +01:00
|
|
|
|
namespace Birdmap.BLL.Options
|
2020-11-09 18:12:07 +01:00
|
|
|
|
{
|
2021-01-16 15:23:10 +01:00
|
|
|
|
public class MqttClientOptions : MqttClientOptionsBuilder
|
2020-11-09 18:12:07 +01:00
|
|
|
|
{
|
|
|
|
|
public IServiceProvider ServiceProvider { get; }
|
|
|
|
|
|
2021-01-16 15:23:10 +01:00
|
|
|
|
public MqttClientOptions(IServiceProvider serviceProvider)
|
2020-11-09 18:12:07 +01:00
|
|
|
|
{
|
|
|
|
|
ServiceProvider = serviceProvider;
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-16 15:23:10 +01:00
|
|
|
|
public MqttClientOptions WithTopic(string topic)
|
2020-11-09 18:12:07 +01:00
|
|
|
|
{
|
|
|
|
|
WithUserProperty("Topic", topic);
|
|
|
|
|
|
|
|
|
|
return this;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|