public void RegisterEnumerableHandler <TMessageRequest, TMessageResponse>(IEnumerableMessageHandler <TMessageRequest, TMessageResponse> handler, Guid?referenceId = null)
     where TMessageRequest : notnull, IMessage, new()
     where TMessageResponse : notnull, IEnumerableMessage, new()
 {
     Events.Add(_networkBus.RegisterEnumerableHandler(handler, referenceId));
 }
Beispiel #2
0
 public static IDisposable RegisterEnumerableHandler <TMessageRequest, TMessageResponse>(this INetworkBus bus, IEnumerableMessageHandler <TMessageRequest, TMessageResponse> handler, Guid?referenceId = null)
     where TMessageRequest : notnull, IMessage, new()
     where TMessageResponse : notnull, IEnumerableMessage, new()
 {
     return(bus.SubscribeAndReplyEnumerable <TMessageRequest, TMessageResponse>(handler.HandleAsync, referenceId));
 }