Added Mqtt and SignalR
This commit is contained in:
22
Birdmap.API/Options/AspCoreMqttClientOptions.cs
Normal file
22
Birdmap.API/Options/AspCoreMqttClientOptions.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using MQTTnet.Client.Options;
|
||||
using System;
|
||||
|
||||
namespace Birdmap.API.Options
|
||||
{
|
||||
public class AspCoreMqttClientOptions : MqttClientOptionsBuilder
|
||||
{
|
||||
public IServiceProvider ServiceProvider { get; }
|
||||
|
||||
public AspCoreMqttClientOptions(IServiceProvider serviceProvider)
|
||||
{
|
||||
ServiceProvider = serviceProvider;
|
||||
}
|
||||
|
||||
public AspCoreMqttClientOptions WithTopic(string topic)
|
||||
{
|
||||
WithUserProperty("Topic", topic);
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user