mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-27 00:40:01 +08:00
Add more handling options to interceptor contexts.
This commit is contained in:
@@ -36,18 +36,36 @@ namespace MQTTnet.Tests.Mockups
|
||||
set => Implementation.ConnectedHandler = value;
|
||||
}
|
||||
|
||||
public event Func<MqttClientConnectedEventArgs, Task> ConnectedAsync
|
||||
{
|
||||
add => Implementation.ConnectedAsync += value;
|
||||
remove => Implementation.ConnectedAsync -= value;
|
||||
}
|
||||
|
||||
public IMqttClientDisconnectedHandler DisconnectedHandler
|
||||
{
|
||||
get => Implementation.DisconnectedHandler;
|
||||
set => Implementation.DisconnectedHandler = value;
|
||||
}
|
||||
|
||||
public event Func<MqttClientDisconnectedEventArgs, Task> DisconnectedAsync
|
||||
{
|
||||
add => Implementation.DisconnectedAsync += value;
|
||||
remove => Implementation.DisconnectedAsync -= value;
|
||||
}
|
||||
|
||||
public IMqttApplicationMessageReceivedHandler ApplicationMessageReceivedHandler
|
||||
{
|
||||
get => Implementation.ApplicationMessageReceivedHandler;
|
||||
set => Implementation.ApplicationMessageReceivedHandler = value;
|
||||
}
|
||||
|
||||
public event Func<MqttApplicationMessageReceivedEventArgs, Task> ApplicationMessageReceivedAsync
|
||||
{
|
||||
add => Implementation.ApplicationMessageReceivedAsync += value;
|
||||
remove => Implementation.ApplicationMessageReceivedAsync -= value;
|
||||
}
|
||||
|
||||
public Task<MqttClientConnectResult> ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken)
|
||||
{
|
||||
if (TestContext != null)
|
||||
|
||||
Reference in New Issue
Block a user