@@ -2,7 +2,7 @@ | |||||
<package > | <package > | ||||
<metadata> | <metadata> | ||||
<id>MQTTnet.AspNetCore</id> | <id>MQTTnet.AspNetCore</id> | ||||
<version>2.7.5</version> | |||||
<version>0.0.0</version> | |||||
<authors>Christian Kratky</authors> | <authors>Christian Kratky</authors> | ||||
<owners>Christian Kratky</owners> | <owners>Christian Kratky</owners> | ||||
<licenseUrl>https://github.com/chkr1011/MQTTnet/blob/master/LICENSE</licenseUrl> | <licenseUrl>https://github.com/chkr1011/MQTTnet/blob/master/LICENSE</licenseUrl> | ||||
@@ -10,13 +10,13 @@ | |||||
<iconUrl>https://raw.githubusercontent.com/chkr1011/MQTTnet/master/Images/Logo_128x128.png</iconUrl> | <iconUrl>https://raw.githubusercontent.com/chkr1011/MQTTnet/master/Images/Logo_128x128.png</iconUrl> | ||||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | <requireLicenseAcceptance>false</requireLicenseAcceptance> | ||||
<description>This is a support library to integrate MQTTnet into AspNetCore.</description> | <description>This is a support library to integrate MQTTnet into AspNetCore.</description> | ||||
<releaseNotes>* Updated to MQTTnet 2.7.5. | |||||
<releaseNotes>* Updated to MQTTnet 2.8.0. | |||||
</releaseNotes> | </releaseNotes> | ||||
<copyright>Copyright Christian Kratky 2016-2018</copyright> | <copyright>Copyright Christian Kratky 2016-2018</copyright> | ||||
<tags>MQTT Message Queue Telemetry Transport MQTTClient MQTTServer Server MQTTBroker Broker NETStandard IoT InternetOfThings Messaging Hardware Arduino Sensor Actuator M2M ESP Smart Home Cities Automation Xamarin</tags> | <tags>MQTT Message Queue Telemetry Transport MQTTClient MQTTServer Server MQTTBroker Broker NETStandard IoT InternetOfThings Messaging Hardware Arduino Sensor Actuator M2M ESP Smart Home Cities Automation Xamarin</tags> | ||||
<dependencies> | <dependencies> | ||||
<group targetFramework="netstandard2.0"> | <group targetFramework="netstandard2.0"> | ||||
<dependency id="MQTTnet" version="2.7.5" /> | |||||
<dependency id="MQTTnet" version="2.8.0-alpha5" /> | |||||
</group> | </group> | ||||
</dependencies> | </dependencies> | ||||
</metadata> | </metadata> | ||||
@@ -0,0 +1,53 @@ | |||||
<?xml version="1.0"?> | |||||
<package > | |||||
<metadata> | |||||
<id>MQTTnet.Extensions.ManagedClient</id> | |||||
<version>0.0.0</version> | |||||
<authors>Christian Kratky</authors> | |||||
<owners>Christian Kratky</owners> | |||||
<licenseUrl>https://github.com/chkr1011/MQTTnet/blob/master/LICENSE</licenseUrl> | |||||
<projectUrl>https://github.com/chkr1011/MQTTnet</projectUrl> | |||||
<iconUrl>https://raw.githubusercontent.com/chkr1011/MQTTnet/master/Images/Logo_128x128.png</iconUrl> | |||||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | |||||
<description>This is an extension library which provides a managed MQTT client with additional features using MQTTnet.</description> | |||||
<releaseNotes>* Updated to MQTTnet 2.8.0. | |||||
</releaseNotes> | |||||
<copyright>Copyright Christian Kratky 2016-2018</copyright> | |||||
<tags>MQTT Message Queue Telemetry Transport MQTTClient MQTTServer Server MQTTBroker Broker NETStandard IoT InternetOfThings Messaging Hardware Arduino Sensor Actuator M2M ESP Smart Home Cities Automation Xamarin</tags> | |||||
<dependencies> | |||||
<group targetFramework="netstandard2.0"> | |||||
<dependency id="MQTTnet" version="2.8.0-alpha5" /> | |||||
</group> | |||||
<group targetFramework="netstandard1.3"> | |||||
<dependency id="MQTTnet" version="2.8.0-alpha5" /> | |||||
</group> | |||||
<group targetFramework="netstandard2.0"> | |||||
<dependency id="MQTTnet" version="2.8.0-alpha5" /> | |||||
</group> | |||||
<group targetFramework="uap10.0"> | |||||
<dependency id="MQTTnet" version="2.8.0-alpha5" /> | |||||
</group> | |||||
<group targetFramework="net452"> | |||||
<dependency id="MQTTnet" version="2.8.0-alpha5" /> | |||||
</group> | |||||
<group targetFramework="net461"> | |||||
<dependency id="MQTTnet" version="2.8.0-alpha5" /> | |||||
</group> | |||||
</dependencies> | |||||
</metadata> | |||||
<files> | |||||
<!-- .NET Standard 1.3 --> | |||||
<file src="..\Extensions\MQTTnet.Extensions.ManagedClient\bin\Release\netstandard1.3\MQTTnet.Extensions.ManagedClient.*" target="lib\netstandard1.3\"/> | |||||
<!-- .NET Standard 2.0 --> | |||||
<file src="..\Extensions\MQTTnet.Extensions.ManagedClient\bin\Release\netstandard2.0\MQTTnet.Extensions.ManagedClient.*" target="lib\netstandard2.0\"/> | |||||
<!-- Universal Windows --> | |||||
<file src="..\Extensions\MQTTnet.Extensions.ManagedClient\bin\Release\uap10.0\MQTTnet.Extensions.ManagedClient.*" target="lib\uap10.0\"/> | |||||
<!-- .NET Framework --> | |||||
<file src="..\Extensions\MQTTnet.Extensions.ManagedClient\bin\Release\net452\MQTTnet.Extensions.ManagedClient.*" target="lib\net452\"/> | |||||
<file src="..\Extensions\MQTTnet.Extensions.ManagedClient\bin\Release\net461\MQTTnet.Extensions.ManagedClient.*" target="lib\net461\"/> | |||||
</files> | |||||
</package> |
@@ -2,46 +2,46 @@ | |||||
<package > | <package > | ||||
<metadata> | <metadata> | ||||
<id>MQTTnet.Extensions.Rpc</id> | <id>MQTTnet.Extensions.Rpc</id> | ||||
<version>2.7.5</version> | |||||
<version>0.0.0</version> | |||||
<authors>Christian Kratky</authors> | <authors>Christian Kratky</authors> | ||||
<owners>Christian Kratky</owners> | <owners>Christian Kratky</owners> | ||||
<licenseUrl>https://github.com/chkr1011/MQTTnet/blob/master/LICENSE</licenseUrl> | <licenseUrl>https://github.com/chkr1011/MQTTnet/blob/master/LICENSE</licenseUrl> | ||||
<projectUrl>https://github.com/chkr1011/MQTTnet</projectUrl> | <projectUrl>https://github.com/chkr1011/MQTTnet</projectUrl> | ||||
<iconUrl>https://raw.githubusercontent.com/chkr1011/MQTTnet/master/Images/Logo_128x128.png</iconUrl> | <iconUrl>https://raw.githubusercontent.com/chkr1011/MQTTnet/master/Images/Logo_128x128.png</iconUrl> | ||||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | <requireLicenseAcceptance>false</requireLicenseAcceptance> | ||||
<description>This is a extension library which allows executing synchronous device calls including a response using MQTTnet.</description> | |||||
<releaseNotes>* Updated to MQTTnet 2.7.5. | |||||
<description>This is an extension library which allows executing synchronous device calls including a response using MQTTnet.</description> | |||||
<releaseNotes>* Updated to MQTTnet 2.8.0. | |||||
</releaseNotes> | </releaseNotes> | ||||
<copyright>Copyright Christian Kratky 2016-2018</copyright> | <copyright>Copyright Christian Kratky 2016-2018</copyright> | ||||
<tags>MQTT Message Queue Telemetry Transport MQTTClient MQTTServer Server MQTTBroker Broker NETStandard IoT InternetOfThings Messaging Hardware Arduino Sensor Actuator M2M ESP Smart Home Cities Automation Xamarin</tags> | <tags>MQTT Message Queue Telemetry Transport MQTTClient MQTTServer Server MQTTBroker Broker NETStandard IoT InternetOfThings Messaging Hardware Arduino Sensor Actuator M2M ESP Smart Home Cities Automation Xamarin</tags> | ||||
<dependencies> | <dependencies> | ||||
<group targetFramework="netstandard2.0"> | <group targetFramework="netstandard2.0"> | ||||
<dependency id="MQTTnet" version="2.7.5" /> | |||||
<dependency id="MQTTnet" version="2.8.0-alpha5" /> | |||||
</group> | </group> | ||||
<group targetFramework="netstandard1.3"> | <group targetFramework="netstandard1.3"> | ||||
<dependency id="MQTTnet" version="2.7.5" /> | |||||
<dependency id="MQTTnet" version="2.8.0-alpha5" /> | |||||
</group> | </group> | ||||
<group targetFramework="netstandard2.0"> | <group targetFramework="netstandard2.0"> | ||||
<dependency id="MQTTnet" version="2.7.5" /> | |||||
<dependency id="MQTTnet" version="2.8.0-alpha5" /> | |||||
</group> | </group> | ||||
<group targetFramework="uap10.0"> | <group targetFramework="uap10.0"> | ||||
<dependency id="MQTTnet" version="2.7.5" /> | |||||
<dependency id="MQTTnet" version="2.8.0-alpha5" /> | |||||
</group> | </group> | ||||
<group targetFramework="net452"> | <group targetFramework="net452"> | ||||
<dependency id="MQTTnet" version="2.7.5" /> | |||||
<dependency id="MQTTnet" version="2.8.0-alpha5" /> | |||||
</group> | </group> | ||||
<group targetFramework="net461"> | <group targetFramework="net461"> | ||||
<dependency id="MQTTnet" version="2.7.5" /> | |||||
<dependency id="MQTTnet" version="2.8.0-alpha5" /> | |||||
</group> | </group> | ||||
</dependencies> | </dependencies> | ||||
</metadata> | </metadata> | ||||
<files> | <files> | ||||
<!-- .NET Standard 1.3 --> | <!-- .NET Standard 1.3 --> | ||||
<file src="..\Extensions\MQTTnet.Extensions.Rpc\bin\Release\MQTTnet.Extensions.Rpc.*" target="lib\netstandard1.3\"/> | |||||
<file src="..\Extensions\MQTTnet.Extensions.Rpc\bin\Release\netstandard1.3\MQTTnet.Extensions.Rpc.*" target="lib\netstandard1.3\"/> | |||||
<!-- .NET Standard 2.0 --> | <!-- .NET Standard 2.0 --> | ||||
<file src="..\Extensions\MQTTnet.Extensions.Rpc\bin\Release\MQTTnet.Extensions.Rpc.*" target="lib\netstandard2.0\"/> | |||||
<file src="..\Extensions\MQTTnet.Extensions.Rpc\bin\Release\netstandard2.0\MQTTnet.Extensions.Rpc.*" target="lib\netstandard2.0\"/> | |||||
<!-- Universal Windows --> | <!-- Universal Windows --> | ||||
<file src="..\Extensions\MQTTnet.Extensions.Rpc\bin\Release\uap10.0\MQTTnet.Extensions.Rpc.*" target="lib\uap10.0\"/> | <file src="..\Extensions\MQTTnet.Extensions.Rpc\bin\Release\uap10.0\MQTTnet.Extensions.Rpc.*" target="lib\uap10.0\"/> | ||||
@@ -2,7 +2,7 @@ | |||||
<package > | <package > | ||||
<metadata> | <metadata> | ||||
<id>MQTTnet</id> | <id>MQTTnet</id> | ||||
<version>2.8.0</version> | |||||
<version>0.0.0</version> | |||||
<authors>Christian Kratky</authors> | <authors>Christian Kratky</authors> | ||||
<owners>Christian Kratky</owners> | <owners>Christian Kratky</owners> | ||||
<licenseUrl>https://github.com/chkr1011/MQTTnet/blob/master/LICENSE</licenseUrl> | <licenseUrl>https://github.com/chkr1011/MQTTnet/blob/master/LICENSE</licenseUrl> | ||||
@@ -17,6 +17,9 @@ | |||||
* [Core] The adapter now has an _Endpoint_ definition as string containing remote IP and port. | * [Core] The adapter now has an _Endpoint_ definition as string containing remote IP and port. | ||||
* [Client] Received messages are now processed completely in the worker thread without creating new Tasks. | * [Client] Received messages are now processed completely in the worker thread without creating new Tasks. | ||||
* [Client] Fixed wrong calculation for sending keep alive packets (thanks to @cstichlberger) | * [Client] Fixed wrong calculation for sending keep alive packets (thanks to @cstichlberger) | ||||
* [Client] A clean disconnect (via DisconnectAsync) will no longer throw an exception. | |||||
* [ManagedClient] The managed client is moved to a separate nuget package. | |||||
* [ManagedClient] Added an own message format with extended properties like ID. | |||||
* [ManagedClient] Fixed a loading issue of stored application messages (thanks to @JTrotta). | * [ManagedClient] Fixed a loading issue of stored application messages (thanks to @JTrotta). | ||||
* [Server] Added support for other WebSocket sub protocol formats like mqttv-3.1.1 (thanks to @israellot). | * [Server] Added support for other WebSocket sub protocol formats like mqttv-3.1.1 (thanks to @israellot). | ||||
* [Server] The takeover of an existing client sessions is now treated as a _clean_ disconnect of the previous client. | * [Server] The takeover of an existing client sessions is now treated as a _clean_ disconnect of the previous client. | ||||
@@ -26,10 +26,18 @@ if ($path) { | |||||
&$msbuild ..\Extensions\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard2.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx" | &$msbuild ..\Extensions\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard2.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx" | ||||
&$msbuild ..\Extensions\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="uap10.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx" | &$msbuild ..\Extensions\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="uap10.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx" | ||||
Remove-Item .\NuGet -Force -Recurse -ErrorAction SilentlyContinue | |||||
# Build the Managed Client extension | |||||
&$msbuild ..\Extensions\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net452" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx" | |||||
&$msbuild ..\Extensions\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net461" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx" | |||||
&$msbuild ..\Extensions\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard1.3" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx" | |||||
&$msbuild ..\Extensions\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard2.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx" | |||||
&$msbuild ..\Extensions\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="uap10.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx" | |||||
Remove-Item .\NuGet -Force -Recurse -ErrorAction SilentlyContinue | |||||
New-Item -ItemType Directory -Force -Path .\NuGet | New-Item -ItemType Directory -Force -Path .\NuGet | ||||
.\NuGet.exe pack MQTTnet.nuspec -Verbosity detailed -Symbols -OutputDir "NuGet" -Version $nugetVersion | .\NuGet.exe pack MQTTnet.nuspec -Verbosity detailed -Symbols -OutputDir "NuGet" -Version $nugetVersion | ||||
.\NuGet.exe pack MQTTnet.AspNetCore.nuspec -Verbosity detailed -Symbols -OutputDir "NuGet" -Version $nugetVersion | .\NuGet.exe pack MQTTnet.AspNetCore.nuspec -Verbosity detailed -Symbols -OutputDir "NuGet" -Version $nugetVersion | ||||
.\NuGet.exe pack MQTTnet.Extensions.Rpc.nuspec -Verbosity detailed -Symbols -OutputDir "NuGet" -Version $nugetVersion | .\NuGet.exe pack MQTTnet.Extensions.Rpc.nuspec -Verbosity detailed -Symbols -OutputDir "NuGet" -Version $nugetVersion | ||||
.\NuGet.exe pack MQTTnet.Extensions.ManagedClient.nuspec -Verbosity detailed -Symbols -OutputDir "NuGet" -Version $nugetVersion | |||||
} | } |
@@ -1,6 +1,6 @@ | |||||
using System; | using System; | ||||
namespace MQTTnet.ManagedClient | |||||
namespace MQTTnet.Extensions.ManagedClient | |||||
{ | { | ||||
public class ApplicationMessageProcessedEventArgs : EventArgs | public class ApplicationMessageProcessedEventArgs : EventArgs | ||||
{ | { |
@@ -3,7 +3,7 @@ using System.Collections.Generic; | |||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
using MQTTnet.Client; | using MQTTnet.Client; | ||||
namespace MQTTnet.ManagedClient | |||||
namespace MQTTnet.Extensions.ManagedClient | |||||
{ | { | ||||
public interface IManagedMqttClient : IApplicationMessageReceiver, IApplicationMessagePublisher, IDisposable | public interface IManagedMqttClient : IApplicationMessageReceiver, IApplicationMessagePublisher, IDisposable | ||||
{ | { |
@@ -1,7 +1,7 @@ | |||||
using System; | using System; | ||||
using MQTTnet.Client; | using MQTTnet.Client; | ||||
namespace MQTTnet.ManagedClient | |||||
namespace MQTTnet.Extensions.ManagedClient | |||||
{ | { | ||||
public interface IManagedMqttClientOptions | public interface IManagedMqttClientOptions | ||||
{ | { |
@@ -1,7 +1,7 @@ | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
namespace MQTTnet.ManagedClient | |||||
namespace MQTTnet.Extensions.ManagedClient | |||||
{ | { | ||||
public interface IManagedMqttClientStorage | public interface IManagedMqttClientStorage | ||||
{ | { |
@@ -0,0 +1,31 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | |||||
<PropertyGroup> | |||||
<TargetFrameworks>netstandard1.3;netstandard2.0;net452;net461;uap10.0</TargetFrameworks> | |||||
<AssemblyVersion>0.0.0.0</AssemblyVersion> | |||||
<FileVersion>0.0.0.0</FileVersion> | |||||
<Product /> | |||||
<Company /> | |||||
<Authors /> | |||||
<PackageId /> | |||||
<Version>0.0.0.0</Version> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0'"> | |||||
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies> | |||||
<NugetTargetMoniker>UAP,Version=v10.0</NugetTargetMoniker> | |||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier> | |||||
<TargetPlatformVersion>10.0.17134.0</TargetPlatformVersion> | |||||
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion> | |||||
<TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier> | |||||
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion> | |||||
<DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants> | |||||
<DefaultLanguage>en</DefaultLanguage> | |||||
<LanguageTargets>$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets</LanguageTargets> | |||||
</PropertyGroup> | |||||
<ItemGroup> | |||||
<ProjectReference Include="..\..\Frameworks\MQTTnet.NetStandard\MQTTnet.NetStandard.csproj" /> | |||||
</ItemGroup> | |||||
</Project> |
@@ -0,0 +1,11 @@ | |||||
using System; | |||||
namespace MQTTnet.Extensions.ManagedClient | |||||
{ | |||||
public class ManagedMqttApplicationMessage | |||||
{ | |||||
public Guid Id { get; set; } = Guid.NewGuid(); | |||||
public MqttApplicationMessage ApplicationMessage { get; set; } | |||||
} | |||||
} |
@@ -10,7 +10,7 @@ using MQTTnet.Exceptions; | |||||
using MQTTnet.Internal; | using MQTTnet.Internal; | ||||
using MQTTnet.Protocol; | using MQTTnet.Protocol; | ||||
namespace MQTTnet.ManagedClient | |||||
namespace MQTTnet.Extensions.ManagedClient | |||||
{ | { | ||||
public class ManagedMqttClient : IManagedMqttClient | public class ManagedMqttClient : IManagedMqttClient | ||||
{ | { |
@@ -2,7 +2,7 @@ | |||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
using MQTTnet.Protocol; | using MQTTnet.Protocol; | ||||
namespace MQTTnet.ManagedClient | |||||
namespace MQTTnet.Extensions.ManagedClient | |||||
{ | { | ||||
public static class ManagedMqttClientExtensions | public static class ManagedMqttClientExtensions | ||||
{ | { |
@@ -1,7 +1,7 @@ | |||||
using System; | using System; | ||||
using MQTTnet.Client; | using MQTTnet.Client; | ||||
namespace MQTTnet.ManagedClient | |||||
namespace MQTTnet.Extensions.ManagedClient | |||||
{ | { | ||||
public class ManagedMqttClientOptions : IManagedMqttClientOptions | public class ManagedMqttClientOptions : IManagedMqttClientOptions | ||||
{ | { |
@@ -1,7 +1,7 @@ | |||||
using System; | using System; | ||||
using MQTTnet.Client; | using MQTTnet.Client; | ||||
namespace MQTTnet.ManagedClient | |||||
namespace MQTTnet.Extensions.ManagedClient | |||||
{ | { | ||||
public class ManagedMqttClientOptionsBuilder | public class ManagedMqttClientOptionsBuilder | ||||
{ | { |
@@ -4,7 +4,7 @@ using System.Threading; | |||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
using MQTTnet.Internal; | using MQTTnet.Internal; | ||||
namespace MQTTnet.ManagedClient | |||||
namespace MQTTnet.Extensions.ManagedClient | |||||
{ | { | ||||
public class ManagedMqttClientStorageManager | public class ManagedMqttClientStorageManager | ||||
{ | { |
@@ -0,0 +1,24 @@ | |||||
using System; | |||||
using MQTTnet.Client; | |||||
using MQTTnet.Diagnostics; | |||||
namespace MQTTnet.Extensions.ManagedClient | |||||
{ | |||||
public static class MqttFactoryExtensions | |||||
{ | |||||
public static IManagedMqttClient CreateManagedMqttClient(this IMqttClientFactory factory) | |||||
{ | |||||
if (factory == null) throw new ArgumentNullException(nameof(factory)); | |||||
return new ManagedMqttClient(factory.CreateMqttClient(), new MqttNetLogger().CreateChildLogger()); | |||||
} | |||||
public static IManagedMqttClient CreateManagedMqttClient(this IMqttClientFactory factory, IMqttNetLogger logger) | |||||
{ | |||||
if (factory == null) throw new ArgumentNullException(nameof(factory)); | |||||
if (logger == null) throw new ArgumentNullException(nameof(logger)); | |||||
return new ManagedMqttClient(factory.CreateMqttClient(), logger.CreateChildLogger()); | |||||
} | |||||
} | |||||
} |
@@ -1,4 +1,4 @@ | |||||
namespace MQTTnet.ManagedClient | |||||
namespace MQTTnet.Extensions.ManagedClient | |||||
{ | { | ||||
public enum ReconnectionResult | public enum ReconnectionResult | ||||
{ | { |
@@ -1,5 +1,4 @@ | |||||
using MQTTnet.Diagnostics; | using MQTTnet.Diagnostics; | ||||
using MQTTnet.ManagedClient; | |||||
namespace MQTTnet.Client | namespace MQTTnet.Client | ||||
{ | { | ||||
@@ -8,9 +7,5 @@ namespace MQTTnet.Client | |||||
IMqttClient CreateMqttClient(); | IMqttClient CreateMqttClient(); | ||||
IMqttClient CreateMqttClient(IMqttNetLogger logger); | IMqttClient CreateMqttClient(IMqttNetLogger logger); | ||||
IManagedMqttClient CreateManagedMqttClient(); | |||||
IManagedMqttClient CreateManagedMqttClient(IMqttNetLogger logger); | |||||
} | } | ||||
} | } |