mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 11:45:43 +08:00
Refactoring
This commit is contained in:
@@ -71,5 +71,9 @@ namespace MQTTnet.Core.Tests
|
||||
{
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -354,13 +354,17 @@ namespace MQTTnet.TestApp.UniversalWindows
|
||||
{
|
||||
var rpcClient = new MqttRpcClient(_mqttClient);
|
||||
var response = await rpcClient.ExecuteAsync(TimeSpan.FromSeconds(5), RpcMethod.Text, payload, qos);
|
||||
|
||||
|
||||
RpcResponses.Items.Add(RpcMethod.Text + " >>> " + Encoding.UTF8.GetString(response));
|
||||
}
|
||||
catch (MqttCommunicationTimedOutException)
|
||||
{
|
||||
RpcResponses.Items.Add(RpcMethod.Text + " >>> [TIMEOUT]");
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
RpcResponses.Items.Add(RpcMethod.Text + " >>> [EXCEPTION (" + exception.Message + ")]");
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearRpcResponses(object sender, RoutedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user