This commit is contained in:
IMPAQ\pnow
2017-09-01 11:28:31 +02:00
parent 3a1e32f5aa
commit 4a57d050f6
3 changed files with 14 additions and 12 deletions
@@ -11,12 +11,14 @@ namespace MQTTnet
{
public IMqttClient CreateMqttClient(MqttClientOptions options)
{
if (options == null) throw new ArgumentNullException(nameof(options));
if (options == null) {
throw new ArgumentNullException(nameof(options));
}
return new MqttClient(options, new MqttChannelCommunicationAdapter(GetMqttCommunicationChannel(options), new MqttPacketSerializer()));
}
private IMqttCommunicationChannel GetMqttCommunicationChannel(MqttClientOptions options)
private static IMqttCommunicationChannel GetMqttCommunicationChannel(MqttClientOptions options)
{
switch (options.ConnectionType)
{