mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-18 02:13:00 +08:00
47 lines
1.7 KiB
C#
47 lines
1.7 KiB
C#
// Licensed to the .NET Foundation under one or more agreements.
|
|
// The .NET Foundation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using MQTTnet.Packets;
|
|
|
|
namespace MQTTnet.Client
|
|
{
|
|
public sealed class MqttClientUnsubscribeResult
|
|
{
|
|
public MqttClientUnsubscribeResult(
|
|
ushort packetIdentifier,
|
|
IReadOnlyCollection<MqttClientUnsubscribeResultItem> items,
|
|
string reasonString,
|
|
IReadOnlyCollection<MqttUserProperty> userProperties)
|
|
{
|
|
PacketIdentifier = packetIdentifier;
|
|
Items = items ?? throw new ArgumentNullException(nameof(items));
|
|
ReasonString = reasonString;
|
|
UserProperties = userProperties ?? throw new ArgumentNullException(nameof(userProperties));
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the result for every topic filter item.
|
|
/// </summary>
|
|
public IReadOnlyCollection<MqttClientUnsubscribeResultItem> Items { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the packet identifier which was used.
|
|
/// </summary>
|
|
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 UNSUBACK packet.
|
|
/// <remarks>MQTT 5.0.0+ feature.</remarks>
|
|
/// </summary>
|
|
public IReadOnlyCollection<MqttUserProperty> UserProperties { get; set; }
|
|
}
|
|
} |