mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 01:03:01 +08:00
27 lines
731 B
C#
27 lines
731 B
C#
using MQTTnet.Core.Adapter;
|
|
using MQTTnet.Core.Channel;
|
|
using MQTTnet.Core.Client;
|
|
|
|
namespace MQTTnet.Core.Tests
|
|
{
|
|
public class MqttCommunicationAdapterFactory : IMqttCommunicationAdapterFactory
|
|
{
|
|
private readonly IMqttCommunicationAdapter _adapter;
|
|
|
|
public MqttCommunicationAdapterFactory(IMqttCommunicationAdapter adapter)
|
|
{
|
|
_adapter = adapter;
|
|
}
|
|
|
|
public IMqttCommunicationAdapter CreateClientMqttCommunicationAdapter(IMqttClientOptions options)
|
|
{
|
|
return _adapter;
|
|
}
|
|
|
|
public IMqttCommunicationAdapter CreateServerMqttCommunicationAdapter(IMqttCommunicationChannel channel)
|
|
{
|
|
return _adapter;
|
|
}
|
|
}
|
|
}
|