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, 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); }