コード例 #1
0
        public static ConnectHandle ConnectStateMachineSaga <TInstance>(this IConsumePipeConnector pipe, IKernel kernel)
            where TInstance : class, SagaStateMachineInstance
        {
            SagaStateMachine <TInstance> stateMachine = kernel.ResolveSagaStateMachine <TInstance>();

            return(pipe.ConnectStateMachineSaga(stateMachine, kernel));
        }
コード例 #2
0
        public static ConnectHandle ConnectStateMachineSaga <TInstance>(this IConsumePipeConnector bus, SagaStateMachine <TInstance> stateMachine,
                                                                        Container container, Action <ISagaConfigurator <TInstance> > configure = null)
            where TInstance : class, SagaStateMachineInstance
        {
            ISagaRepository <TInstance> repository = CreateSagaRepository <TInstance>(container);

            return(bus.ConnectStateMachineSaga(stateMachine, repository, configure));
        }
コード例 #3
0
        public static ConnectHandle ConnectStateMachineSaga <TInstance>(this IConsumePipeConnector pipe, IContainer container,
                                                                        Action <ConsumeContext> configureScope = null)
            where TInstance : class, SagaStateMachineInstance
        {
            SagaStateMachine <TInstance> stateMachine = GetSagaStateMachine <TInstance>(container);

            return(pipe.ConnectStateMachineSaga(stateMachine, container, configureScope));
        }
コード例 #4
0
        public static ConnectHandle ConnectStateMachineSaga <TInstance>(this IConsumePipeConnector pipe, ILifetimeScope scope, string name = "message",
                                                                        Action <ContainerBuilder, ConsumeContext> configureScope           = null)
            where TInstance : class, SagaStateMachineInstance
        {
            SagaStateMachine <TInstance> stateMachine = ResolveSagaStateMachine <TInstance>(scope);

            return(pipe.ConnectStateMachineSaga(stateMachine, scope, name, configureScope));
        }
        public static ConnectHandle ConnectStateMachineSaga <TInstance>(this IConsumePipeConnector pipe, IWindsorContainer container)
            where TInstance : class, SagaStateMachineInstance
        {
            ISagaStateMachineFactory stateMachineFactory = new WindsorSagaStateMachineFactory(container.Kernel);

            SagaStateMachine <TInstance> stateMachine = stateMachineFactory.CreateStateMachine <TInstance>();

            return(pipe.ConnectStateMachineSaga(stateMachine, container));
        }
コード例 #6
0
        public static ConnectHandle ConnectStateMachineSaga <TInstance>(this IConsumePipeConnector bus, IServiceProvider provider,
                                                                        Action <ISagaConfigurator <TInstance> > configure = null)
            where TInstance : class, SagaStateMachineInstance
        {
            var stateMachine = ResolveSagaStateMachine <TInstance>(provider);

            ISagaRepository <TInstance> repository = CreateSagaRepository <TInstance>(provider);

            return(bus.ConnectStateMachineSaga(stateMachine, repository, configure));
        }
コード例 #7
0
        public static ConnectHandle ConnectStateMachineSaga <TInstance>(this IConsumePipeConnector pipe, IContainer scope,
                                                                        Action <ConsumeContext> configureScope = null)
            where TInstance : class, SagaStateMachineInstance
        {
            ISagaStateMachineFactory stateMachineFactory = new LamarSagaStateMachineFactory(scope);

            SagaStateMachine <TInstance> stateMachine = stateMachineFactory.CreateStateMachine <TInstance>();

            return(pipe.ConnectStateMachineSaga(stateMachine, scope, configureScope));
        }