public static void ExecuteActivityHost <TActivity, TArguments>(this IReceiveEndpointConfigurator configurator, Uri compensateAddress, IContainer container) where TActivity : class, ExecuteActivity <TArguments> where TArguments : class { var executeActivityScopeProvider = new LamarExecuteActivityScopeProvider <TActivity, TArguments>(container); var factory = new ScopeExecuteActivityFactory <TActivity, TArguments>(executeActivityScopeProvider); var specification = new ExecuteActivityHostSpecification <TActivity, TArguments>(factory, compensateAddress); configurator.AddEndpointSpecification(specification); }
public static void ExecuteActivityHost <TActivity, TArguments>(this IReceiveEndpointConfigurator configurator, IContainer container, Action <IExecuteActivityConfigurator <TActivity, TArguments> > configure = null) where TActivity : class, IExecuteActivity <TArguments> where TArguments : class { var executeActivityScopeProvider = new StructureMapExecuteActivityScopeProvider <TActivity, TArguments>(container); var factory = new ScopeExecuteActivityFactory <TActivity, TArguments>(executeActivityScopeProvider); configurator.ExecuteActivityHost(factory, configure); }
public static void ExecuteActivityHost <TActivity, TArguments>(this IReceiveEndpointConfigurator configurator, IServiceProvider provider, Action <IExecuteActivityConfigurator <TActivity, TArguments> > configure = null) where TActivity : class, IExecuteActivity <TArguments> where TArguments : class { var executeActivityScopeProvider = new DependencyInjectionExecuteActivityScopeProvider <TActivity, TArguments>(provider); var factory = new ScopeExecuteActivityFactory <TActivity, TArguments>(executeActivityScopeProvider); configurator.ExecuteActivityHost(factory, configure); }
public static void ExecuteActivityHost <TActivity, TArguments>(this IReceiveEndpointConfigurator configurator, IKernel kernel, Action <IExecuteActivityConfigurator <TActivity, TArguments> > configure = null) where TActivity : class, IExecuteActivity <TArguments> where TArguments : class { var executeActivityScopeProvider = new WindsorExecuteActivityScopeProvider <TActivity, TArguments>(kernel); var factory = new ScopeExecuteActivityFactory <TActivity, TArguments>(executeActivityScopeProvider); configurator.ExecuteActivityHost(factory, configure); }
public static void ExecuteActivityHost <TActivity, TArguments>(this IReceiveEndpointConfigurator configurator, IContext context) where TActivity : class, ExecuteActivity <TArguments> where TArguments : class { var executeActivityScopeProvider = new StructureMapExecuteActivityScopeProvider <TActivity, TArguments>(context); var factory = new ScopeExecuteActivityFactory <TActivity, TArguments>(executeActivityScopeProvider); var specification = new ExecuteActivityHostSpecification <TActivity, TArguments>(factory); configurator.AddEndpointSpecification(specification); }
public static void ExecuteActivityHost <TActivity, TArguments>(this IReceiveEndpointConfigurator configurator, ILifetimeScope lifetimeScope, string name = "message") where TActivity : class, ExecuteActivity <TArguments> where TArguments : class { var lifetimeScopeProvider = new SingleLifetimeScopeProvider(lifetimeScope); var executeActivityScopeProvider = new AutofacExecuteActivityScopeProvider <TActivity, TArguments>(lifetimeScopeProvider, name); var factory = new ScopeExecuteActivityFactory <TActivity, TArguments>(executeActivityScopeProvider); var specification = new ExecuteActivityHostSpecification <TActivity, TArguments>(factory); configurator.AddEndpointSpecification(specification); }
public void Configure(IReceiveEndpointConfigurator configurator, IConfigurationServiceProvider configurationServiceProvider) { var executeActivityScopeProvider = configurationServiceProvider.GetRequiredService <IExecuteActivityScopeProvider <TActivity, TArguments> >(); var executeActivityFactory = new ScopeExecuteActivityFactory <TActivity, TArguments>(executeActivityScopeProvider); var specification = new ExecuteActivityHostSpecification <TActivity, TArguments>(executeActivityFactory); foreach (var action in _configureActions) { action(specification); } configurator.AddEndpointSpecification(specification); }
public static void ExecuteActivityHost <TActivity, TArguments>(this IReceiveEndpointConfigurator configurator, Container container, Action <IExecuteActivityConfigurator <TActivity, TArguments> > configure = null) where TActivity : class, IExecuteActivity <TArguments> where TArguments : class { var executeActivityScopeProvider = new SimpleInjectorExecuteActivityScopeProvider <TActivity, TArguments>(container); var factory = new ScopeExecuteActivityFactory <TActivity, TArguments>(executeActivityScopeProvider); var specification = new ExecuteActivityHostSpecification <TActivity, TArguments>(factory, configurator); configure?.Invoke(specification); configurator.AddEndpointSpecification(specification); }
public static void ExecuteActivityHost <TActivity, TArguments>(this IReceiveEndpointConfigurator configurator, Uri compensateAddress, IServiceProvider serviceProvider, Action <IExecuteActivityConfigurator <TActivity, TArguments> > configure = null) where TActivity : class, ExecuteActivity <TArguments> where TArguments : class { var executeActivityScopeProvider = new DependencyInjectionExecuteActivityScopeProvider <TActivity, TArguments>(serviceProvider); var factory = new ScopeExecuteActivityFactory <TActivity, TArguments>(executeActivityScopeProvider); var specification = new ExecuteActivityHostSpecification <TActivity, TArguments>(factory, compensateAddress); configure?.Invoke(specification); configurator.AddEndpointSpecification(specification); }
public static void ExecuteActivityHost <TActivity, TArguments>(this IReceiveEndpointConfigurator configurator, Uri compensateAddress, ILifetimeScope lifetimeScope, string name = "message", Action <ContainerBuilder, ExecuteContext <TArguments> > configureScope = null) where TActivity : class, ExecuteActivity <TArguments> where TArguments : class { var lifetimeScopeProvider = new SingleLifetimeScopeProvider(lifetimeScope); var executeActivityScopeProvider = new AutofacExecuteActivityScopeProvider <TActivity, TArguments>(lifetimeScopeProvider, name, configureScope); var factory = new ScopeExecuteActivityFactory <TActivity, TArguments>(executeActivityScopeProvider); var specification = new ExecuteActivityHostSpecification <TActivity, TArguments>(factory, compensateAddress); configurator.AddEndpointSpecification(specification); }
void ConfigureExecute(IReceiveEndpointConfigurator configurator, IConfigurationServiceProvider configurationServiceProvider, Uri compensateAddress) { var activityScopeProvider = configurationServiceProvider.GetRequiredService <IExecuteActivityScopeProvider <TActivity, TArguments> >(); var activityFactory = new ScopeExecuteActivityFactory <TActivity, TArguments>(activityScopeProvider); var specification = new ExecuteActivityHostSpecification <TActivity, TArguments>(activityFactory, compensateAddress, configurator); GetActivityDefinition(configurationServiceProvider) .Configure(configurator, specification); foreach (var action in _executeActions) { action(specification); } configurator.AddEndpointSpecification(specification); }
public void ConfigureExecute(IReceiveEndpointConfigurator configurator, IConfigurationServiceProvider configurationServiceProvider, Uri compensateAddress) { var activityScopeProvider = configurationServiceProvider.GetRequiredService <IExecuteActivityScopeProvider <TActivity, TArguments> >(); var activityFactory = new ScopeExecuteActivityFactory <TActivity, TArguments>(activityScopeProvider); var specification = new ExecuteActivityHostSpecification <TActivity, TArguments>(activityFactory, compensateAddress, configurator); LogContext.Debug?.Log("Configuring endpoint {Endpoint}, Execute Activity: {ActivityType}", configurator.InputAddress.GetLastPart(), TypeMetadataCache <TActivity> .ShortName); GetActivityDefinition(configurationServiceProvider) .Configure(configurator, specification); foreach (var action in _executeActions) { action(specification); } configurator.AddEndpointSpecification(specification); }
public void Configure(IReceiveEndpointConfigurator configurator, IConfigurationServiceProvider configurationServiceProvider) { var executeActivityScopeProvider = configurationServiceProvider.GetRequiredService <IExecuteActivityScopeProvider <TActivity, TArguments> >(); var executeActivityFactory = new ScopeExecuteActivityFactory <TActivity, TArguments>(executeActivityScopeProvider); var specification = new ExecuteActivityHostSpecification <TActivity, TArguments>(executeActivityFactory, configurator); configurator.ConfigureConsumeTopology = false; GetActivityDefinition(configurationServiceProvider) .Configure(configurator, specification); foreach (Action <IExecuteActivityConfigurator <TActivity, TArguments> > action in _configureActions) { action(specification); } LogContext.Info?.Log("Configured endpoint {Endpoint}, Execute Activity: {ActivityType}", configurator.InputAddress.GetLastPart(), TypeMetadataCache <TActivity> .ShortName); configurator.AddEndpointSpecification(specification); }