Exemplo n.º 1
0
        public AutofacCompensateActivityFactory(ILifetimeScope lifetimeScope, string name)
        {
            var lifetimeScopeProvider = new SingleLifetimeScopeProvider(lifetimeScope);

            var compensateActivityScopeProvider = new AutofacCompensateActivityScopeProvider <TActivity, TLog>(lifetimeScopeProvider, name);

            _factory = new ScopeCompensateActivityFactory <TActivity, TLog>(compensateActivityScopeProvider);
        }
        public AutofacCompensateActivityFactory(ILifetimeScope lifetimeScope, string name, Action <ContainerBuilder, CompensateContext <TLog> > configureScope)
        {
            var lifetimeScopeProvider = new SingleLifetimeScopeProvider(lifetimeScope);

            var compensateActivityScopeProvider = new AutofacCompensateActivityScopeProvider <TActivity, TLog>(lifetimeScopeProvider, name, configureScope);

            _factory = new ScopeCompensateActivityFactory <TActivity, TLog>(compensateActivityScopeProvider);
        }