Esempio n. 1
0
        public static void Saga <T>(this IReceiveEndpointConfigurator configurator, IKernel kernel, Action <ISagaConfigurator <T> > configure = null)
            where T : class, ISaga
        {
            var sagaRepository = kernel.Get <ISagaRepository <T> >();

            var ninjectSagaRepository = new NinjectSagaRepository <T>(sagaRepository, kernel);

            configurator.Saga(ninjectSagaRepository, configure);
        }
Esempio n. 2
0
        public void Configure <T>()
            where T : class, ISaga
        {
            var sagaRepository = _kernel.Get <ISagaRepository <T> >();

            var ninjectSagaRepository = new NinjectSagaRepository <T>(sagaRepository, _kernel);

            _configurator.Saga(ninjectSagaRepository);
        }
        public static SagaSubscriptionConfigurator <TSaga> Saga <TSaga>(
            this SubscriptionBusServiceConfigurator configurator, IKernel kernel)
            where TSaga : class, ISaga
        {
            var sagaRepository = kernel.Get <ISagaRepository <TSaga> >();

            var ninjectSagaRepository = new NinjectSagaRepository <TSaga>(sagaRepository, kernel);

            return(configurator.Saga(ninjectSagaRepository));
        }