mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-18 10:26:11 +08:00
1862 Add subscribe and unsubscribe results event for Managed Mqtt Client. (#1894)
* See the issue #1862 Adding an event when ManagedMqttClient actually subscribe/unsubscribe to topics. This event has to be used in parallel with connected event to know the exact state. * Rename SubscriptionsResultAsync to SubscriptionsChangedAsync. * Rename internal field for event * Update ReleaseNotes.md --------- Co-authored-by: Pierre Dufrene <pierre.dufrene@se.com> Co-authored-by: Christian <6939810+chkr1011@users.noreply.github.com>
This commit is contained in:
co-authored by
Pierre Dufrene
Christian
parent
1245d8299a
commit
aabf180b23
@@ -0,0 +1,23 @@
|
||||
// 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 MQTTnet.Client;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MQTTnet.Extensions.ManagedClient
|
||||
{
|
||||
public sealed class SubscriptionsChangedEventArgs : EventArgs
|
||||
{
|
||||
public SubscriptionsChangedEventArgs(List<MqttClientSubscribeResult> subscribeResult, List<MqttClientUnsubscribeResult> unsubscribeResult)
|
||||
{
|
||||
SubscribeResult = subscribeResult ?? throw new ArgumentNullException(nameof(subscribeResult));
|
||||
UnsubscribeResult = unsubscribeResult ?? throw new ArgumentNullException(nameof(unsubscribeResult));
|
||||
}
|
||||
|
||||
public List<MqttClientSubscribeResult> SubscribeResult { get; }
|
||||
|
||||
public List<MqttClientUnsubscribeResult> UnsubscribeResult { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user