diff --git a/Source/MQTTnet.AspnetCore/IMqttClientFactory.cs b/Source/MQTTnet.AspnetCore/IMqttClientFactory.cs index 41a7ce551..30472ce54 100644 --- a/Source/MQTTnet.AspnetCore/IMqttClientFactory.cs +++ b/Source/MQTTnet.AspnetCore/IMqttClientFactory.cs @@ -2,10 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using MQTTnet.LowLevelClient; + namespace MQTTnet.AspNetCore { public interface IMqttClientFactory { IMqttClient CreateMqttClient(); + + ILowLevelMqttClient CreateLowLevelMqttClient(); } -} +} \ No newline at end of file diff --git a/Source/MQTTnet.AspnetCore/Internal/AspNetCoreMqttClientFactory.cs b/Source/MQTTnet.AspnetCore/Internal/AspNetCoreMqttClientFactory.cs index 68c8b0085..4c46755c6 100644 --- a/Source/MQTTnet.AspnetCore/Internal/AspNetCoreMqttClientFactory.cs +++ b/Source/MQTTnet.AspnetCore/Internal/AspNetCoreMqttClientFactory.cs @@ -4,6 +4,7 @@ using MQTTnet.Adapter; using MQTTnet.Diagnostics.Logger; +using MQTTnet.LowLevelClient; namespace MQTTnet.AspNetCore { @@ -24,5 +25,10 @@ public IMqttClient CreateMqttClient() { return new MqttClient(_mqttClientAdapterFactory, _logger); } + + public ILowLevelMqttClient CreateLowLevelMqttClient() + { + return new LowLevelMqttClient(_mqttClientAdapterFactory, _logger); + } } }