Refactor code

This commit is contained in:
Christian
2023-01-19 20:53:57 +01:00
parent f8d614e71f
commit 25b42df85c
2 changed files with 19 additions and 15 deletions
@@ -34,7 +34,7 @@ namespace MQTTnet.Client
/// Gets or sets the reason code. /// Gets or sets the reason code.
/// <remarks>MQTT 5.0.0+ feature.</remarks> /// <remarks>MQTT 5.0.0+ feature.</remarks>
/// </summary> /// </summary>
public MqttClientPublishReasonCode ReasonCode { get; } = MqttClientPublishReasonCode.Success; public MqttClientPublishReasonCode ReasonCode { get; }
/// <summary> /// <summary>
/// Gets or sets the reason string. /// Gets or sets the reason string.
@@ -10,7 +10,11 @@ namespace MQTTnet.Client
{ {
public sealed class MqttClientSubscribeResult public sealed class MqttClientSubscribeResult
{ {
public MqttClientSubscribeResult(ushort packetIdentifier, IReadOnlyCollection<MqttClientSubscribeResultItem> items, string reasonString, IReadOnlyCollection<MqttUserProperty> userProperties) public MqttClientSubscribeResult(
ushort packetIdentifier,
IReadOnlyCollection<MqttClientSubscribeResultItem> items,
string reasonString,
IReadOnlyCollection<MqttUserProperty> userProperties)
{ {
PacketIdentifier = packetIdentifier; PacketIdentifier = packetIdentifier;
Items = items ?? throw new ArgumentNullException(nameof(items)); Items = items ?? throw new ArgumentNullException(nameof(items));
@@ -19,26 +23,26 @@ namespace MQTTnet.Client
} }
/// <summary> /// <summary>
/// Gets the result for every topic filter item. /// Gets the result for every topic filter item.
/// </summary> /// </summary>
public IReadOnlyCollection<MqttClientSubscribeResultItem> Items { get; } public IReadOnlyCollection<MqttClientSubscribeResultItem> Items { get; }
/// <summary>
/// Gets the user properties which were part of the SUBACK packet.
/// <remarks>MQTT 5.0.0+ feature.</remarks>
/// </summary>
public IReadOnlyCollection<MqttUserProperty> UserProperties { get; }
/// <summary>
/// Gets the reason string.
/// <remarks>MQTT 5.0.0+ feature.</remarks>
/// </summary>
public string ReasonString { get; }
/// <summary> /// <summary>
/// Gets the user properties which were part of the SUBACK packet. /// Gets the user properties which were part of the SUBACK packet.
/// MQTTv5 only. /// MQTTv5 only.
/// </summary> /// </summary>
public ushort PacketIdentifier { get; } public ushort PacketIdentifier { get; }
/// <summary>
/// Gets the reason string.
/// <remarks>MQTT 5.0.0+ feature.</remarks>
/// </summary>
public string ReasonString { get; }
/// <summary>
/// Gets the user properties which were part of the SUBACK packet.
/// <remarks>MQTT 5.0.0+ feature.</remarks>
/// </summary>
public IReadOnlyCollection<MqttUserProperty> UserProperties { get; }
} }
} }