Beispiel #1
0
        public HostReceiveEndpointHandle ConnectReceiveEndpoint(IEndpointDefinition definition, IEndpointNameFormatter endpointNameFormatter = null,
                                                                Action <IServiceBusReceiveEndpointConfigurator> configureEndpoint            = null)
        {
            var queueName = definition.GetEndpointName(endpointNameFormatter ?? DefaultEndpointNameFormatter.Instance);

            return(ConnectReceiveEndpoint(queueName, x => x.Apply(definition, configureEndpoint)));
        }
Beispiel #2
0
        public void ReceiveEndpoint(IEndpointDefinition definition, IEndpointNameFormatter endpointNameFormatter,
                                    Action <IInMemoryReceiveEndpointConfigurator> configureEndpoint = null)
        {
            var queueName = definition.GetEndpointName(endpointNameFormatter ?? DefaultEndpointNameFormatter.Instance);

            ReceiveEndpoint(queueName, x => x.Apply(definition, configureEndpoint));
        }
Beispiel #3
0
        public HostReceiveEndpointHandle ConnectReceiveEndpoint(IEndpointDefinition definition, IEndpointNameFormatter endpointNameFormatter,
                                                                Action <IBusRegistrationContext, IReceiveEndpointConfigurator> configure = null)
        {
            return(BusControl.ConnectReceiveEndpoint(definition, endpointNameFormatter, configurator =>
            {
                _busRegistrationContext.GetConfigureReceiveEndpoints().Configure(definition.GetEndpointName(endpointNameFormatter), configurator);

                configure?.Invoke(_busRegistrationContext, configurator);
            }));
        }
Beispiel #4
0
        public HostReceiveEndpointHandle ConnectReceiveEndpoint(IEndpointDefinition definition, IEndpointNameFormatter endpointNameFormatter = null,
                                                                Action <IServiceBusReceiveEndpointConfigurator> configureEndpoint            = null)
        {
            var queueName = definition.GetEndpointName(endpointNameFormatter ?? DefaultEndpointNameFormatter.Instance);

            return(ConnectReceiveEndpoint(queueName, configurator =>
            {
                _hostConfiguration.ApplyEndpointDefinition(configurator, definition);
                configureEndpoint?.Invoke(configurator);
            }));
        }
Beispiel #5
0
        public override void ReceiveEndpoint(IEndpointDefinition definition, IEndpointNameFormatter endpointNameFormatter,
                                             Action <IReceiveEndpointConfigurator> configureEndpoint = null)
        {
            var queueName = definition.GetEndpointName(endpointNameFormatter ?? DefaultEndpointNameFormatter.Instance);

            var configuration = _configuration.CreateReceiveEndpointConfiguration(queueName, _configuration.CreateEndpointConfiguration());

            void Configure(IHttpReceiveEndpointConfigurator configurator)
            {
                definition.Configure(configurator);

                configureEndpoint?.Invoke(configurator);
            }

            ConfigureReceiveEndpoint(configuration, configuration.Configurator, Configure);
        }
Beispiel #6
0
        public void ReceiveEndpoint(IHttpHost host, IEndpointDefinition definition, IEndpointNameFormatter endpointNameFormatter,
                                    Action <IHttpReceiveEndpointConfigurator> configureEndpoint = null)
        {
            var queueName = definition.GetEndpointName(endpointNameFormatter ?? DefaultEndpointNameFormatter.Instance);

            if (!_configuration.Hosts.TryGetHost(host, out var hostConfiguration))
            {
                throw new ArgumentException("The host was not configured on this bus", nameof(host));
            }

            var configuration = hostConfiguration.CreateReceiveEndpointConfiguration(queueName);

            void Configure(IHttpReceiveEndpointConfigurator configurator)
            {
                definition.Configure(configurator);

                configureEndpoint?.Invoke(configurator);
            }

            ConfigureReceiveEndpoint(configuration, configuration.Configurator, Configure);
        }
Beispiel #7
0
        string IEndpointDefinition.GetEndpointName(IEndpointNameFormatter formatter)
        {
            var endpointName = _definition.GetEndpointName(formatter);

            return(ServiceEndpointNameFormatter.Instance.ServiceControlEndpointName(endpointName, formatter));
        }
 public string GetEndpointName(IEndpointNameFormatter formatter)
 {
     return(_endpointDefinition.GetEndpointName(formatter));
 }
Beispiel #9
0
 string IConsumerDefinition.GetEndpointName(IEndpointNameFormatter formatter)
 {
     return(_endpointDefinition.GetEndpointName(formatter));
 }
 string IEndpointDefinition.GetEndpointName(IEndpointNameFormatter formatter)
 {
     return(ServiceEndpointNameFormatter.Instance.EndpointName(_instance.InstanceId, _definition.GetEndpointName(formatter)));
 }
Beispiel #11
0
 string IExecuteActivityDefinition.GetExecuteEndpointName(IEndpointNameFormatter formatter)
 {
     return(_endpointDefinition.GetEndpointName(formatter));
 }
Beispiel #12
0
 string IActivityDefinition.GetCompensateEndpointName(IEndpointNameFormatter formatter)
 {
     return(_compensateEndpointDefinition.GetEndpointName(formatter));
 }