From 25b42df85c8158296a6e6ee7c3f1a920ba8634e7 Mon Sep 17 00:00:00 2001
From: Christian <6939810+chkr1011@users.noreply.github.com>
Date: Thu, 19 Jan 2023 20:53:57 +0100
Subject: [PATCH] Refactor code
---
.../Publishing/MqttClientPublishResult.cs | 2 +-
.../Subscribing/MqttClientSubscribeResult.cs | 32 +++++++++++--------
2 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/Source/MQTTnet/Client/Publishing/MqttClientPublishResult.cs b/Source/MQTTnet/Client/Publishing/MqttClientPublishResult.cs
index c9859d1b..e36ce75e 100644
--- a/Source/MQTTnet/Client/Publishing/MqttClientPublishResult.cs
+++ b/Source/MQTTnet/Client/Publishing/MqttClientPublishResult.cs
@@ -34,7 +34,7 @@ namespace MQTTnet.Client
/// Gets or sets the reason code.
/// MQTT 5.0.0+ feature.
///
- public MqttClientPublishReasonCode ReasonCode { get; } = MqttClientPublishReasonCode.Success;
+ public MqttClientPublishReasonCode ReasonCode { get; }
///
/// Gets or sets the reason string.
diff --git a/Source/MQTTnet/Client/Subscribing/MqttClientSubscribeResult.cs b/Source/MQTTnet/Client/Subscribing/MqttClientSubscribeResult.cs
index 51291aab..8fe213b6 100644
--- a/Source/MQTTnet/Client/Subscribing/MqttClientSubscribeResult.cs
+++ b/Source/MQTTnet/Client/Subscribing/MqttClientSubscribeResult.cs
@@ -10,7 +10,11 @@ namespace MQTTnet.Client
{
public sealed class MqttClientSubscribeResult
{
- public MqttClientSubscribeResult(ushort packetIdentifier, IReadOnlyCollection items, string reasonString, IReadOnlyCollection userProperties)
+ public MqttClientSubscribeResult(
+ ushort packetIdentifier,
+ IReadOnlyCollection items,
+ string reasonString,
+ IReadOnlyCollection userProperties)
{
PacketIdentifier = packetIdentifier;
Items = items ?? throw new ArgumentNullException(nameof(items));
@@ -19,26 +23,26 @@ namespace MQTTnet.Client
}
///
- /// Gets the result for every topic filter item.
+ /// Gets the result for every topic filter item.
///
public IReadOnlyCollection Items { get; }
-
- ///
- /// Gets the user properties which were part of the SUBACK packet.
- /// MQTT 5.0.0+ feature.
- ///
- public IReadOnlyCollection UserProperties { get; }
-
- ///
- /// Gets the reason string.
- /// MQTT 5.0.0+ feature.
- ///
- public string ReasonString { get; }
///
/// Gets the user properties which were part of the SUBACK packet.
/// MQTTv5 only.
///
public ushort PacketIdentifier { get; }
+
+ ///
+ /// Gets the reason string.
+ /// MQTT 5.0.0+ feature.
+ ///
+ public string ReasonString { get; }
+
+ ///
+ /// Gets the user properties which were part of the SUBACK packet.
+ /// MQTT 5.0.0+ feature.
+ ///
+ public IReadOnlyCollection UserProperties { get; }
}
}
\ No newline at end of file