Exemplo n.º 1
0
 public static Task <MqttClientPublishResult> PublishAsync <TEvent>(this IEventBus eventBus, TEvent @event, ITopicPattern <TEvent> topicInfo, CancellationToken cancellationToken = default) =>
 eventBus.PublishAsync(StaticCache.EventProvider.CreateMessage(@event, StaticCache.EventProvider.GetTopic(topicInfo)), cancellationToken);
Exemplo n.º 2
0
 public static Task <MqttClientUnsubscribeResult> UnsubscribeAsync <TEvent>(this IEventBus eventBus, ITopicPattern <TEvent> topicInfo, CancellationToken cancellationToken = default) =>
 UnsubscribeAsync <TEvent>(eventBus, StaticCache.EventProvider.GetTopic(topicInfo), cancellationToken);
Exemplo n.º 3
0
 public static string GetTopic <TEvent>(this IEventProvider eventProvider, ITopicPattern <TEvent> toipicInfo) =>
 GetTopic(eventProvider, typeof(TEvent), toipicInfo);