23 lines
498 B
C#
23 lines
498 B
C#
using MQTTnet.Client.Options;
|
|
using System;
|
|
|
|
namespace Birdmap.BLL.Options
|
|
{
|
|
public class MqttClientOptions : MqttClientOptionsBuilder
|
|
{
|
|
public IServiceProvider ServiceProvider { get; }
|
|
|
|
public MqttClientOptions(IServiceProvider serviceProvider)
|
|
{
|
|
ServiceProvider = serviceProvider;
|
|
}
|
|
|
|
public MqttClientOptions WithTopic(string topic)
|
|
{
|
|
WithUserProperty("Topic", topic);
|
|
|
|
return this;
|
|
}
|
|
}
|
|
}
|