mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-15 00:15:15 +08:00
17 lines
549 B
C#
17 lines
549 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MQTTnet
|
|
{
|
|
public static class ApplicationMessagePublisherExtensions
|
|
{
|
|
public static Task PublishAsync(this IApplicationMessagePublisher client, params MqttApplicationMessage[] applicationMessages)
|
|
{
|
|
if (client == null) throw new ArgumentNullException(nameof(client));
|
|
if (applicationMessages == null) throw new ArgumentNullException(nameof(applicationMessages));
|
|
|
|
return client.PublishAsync(applicationMessages);
|
|
}
|
|
}
|
|
}
|