public static IMessageSubscriberManager SubscribeDomainCommands(this IMessageSubscriberManager subscriber) { subscriber.Subscribe <DomainCommandTransportMessage, IMessageHandler <DomainCommandTransportMessage> >(); subscriber.SubscribeAsync <DomainCommandTransportMessage, IAsyncMessageHandler <DomainCommandTransportMessage> >(); return(subscriber); }
public async Task SubscribeAsync <TMessage, TMessageHandler>() where TMessage : IMessage where TMessageHandler : IAsyncMessageHandler <TMessage> => await _subscriber.SubscribeAsync <TMessage, TMessageHandler>();