mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 03:24:33 +08:00
Clean Up
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user