internal SendOnlyInterface Create(string endpointName, RuntimeTypeGenerator typeGenerator, SettingsHolder routerSettings)
        {
            IRuleCreationContext ContextFactory(IRawEndpoint e)
            {
                Settings.Merge(routerSettings);
                return(new RuleCreationContext(Name, EndpointInstances, DistributionPolicy, e, typeGenerator, Settings));
            }

            return(new SendOnlyInterface <T>(overriddenEndpointName ?? endpointName, Name, customization, ContextFactory));
        }
        internal Interface Create(string endpointName, string poisonQueue, bool?routerAutoCreateQueues, string routerAutoCreateQueuesIdentity, int immediateRetries, int delayedRetries, int circuitBreakerThreshold, RuntimeTypeGenerator typeGenerator, SettingsHolder routerSettings)
        {
            IRuleCreationContext ContextFactory(IRawEndpoint e)
            {
                Settings.Merge(routerSettings);
                return(new RuleCreationContext(Name, EndpointInstances, DistributionPolicy, e, typeGenerator, Settings));
            }

            return(new Interface <T>(overriddenEndpointName ?? endpointName, Name, customization, ContextFactory, poisonQueue, maximumConcurrency, autoCreateQueues ?? routerAutoCreateQueues ?? false, autoCreateQueuesIdentity ?? routerAutoCreateQueuesIdentity, immediateRetries, delayedRetries, circuitBreakerThreshold));
        }