mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-15 00:15:15 +08:00
Refactor code
This commit is contained in:
@@ -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; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user