public static ConsumingRouter <T> Create(T service, PublishingRouter publishingRouter, string serviceName, ILogger logger)
        {
            var serviceType   = service.GetType();
            var methods       = serviceType.GetMethods();
            var eventHandlers = GetEventHandlersMethods(methods).ToDictionary(k => k.typeName, v => v.method);

            return(new ConsumingRouter <T>(service, eventHandlers, publishingRouter, serviceName, logger));
        }
 private ConsumingRouter(T service, IReadOnlyDictionary <string, MethodInfo> routing, PublishingRouter publishingRouter, string serviceName, ILogger logger)
 {
     this.service          = service;
     this.routing          = routing;
     this.publishingRouter = publishingRouter;
     this.serviceName      = serviceName;
     this.logger           = logger;
 }