Add interfaces for factories

This commit is contained in:
Christian Kratky
2017-09-19 23:04:42 +02:00
parent 51e7cd725e
commit 651f0aa15c
10 changed files with 84 additions and 12 deletions
@@ -7,7 +7,7 @@ using MQTTnet.Implementations;
namespace MQTTnet
{
public class MqttClientFactory
public class MqttClientFactory : IMqttClientFactory
{
public IMqttClient CreateMqttClient(MqttClientOptions options)
{
@@ -21,9 +21,9 @@ namespace MQTTnet
switch (options.ConnectionType)
{
case MqttConnectionType.Tcp:
return new MqttTcpChannel();
return new MqttTcpChannel();
case MqttConnectionType.Ws:
return new MqttWebSocketChannel();
return new MqttWebSocketChannel();
default:
throw new NotSupportedException();