public AutofacScopeSagaRepository(ISagaRepository <TSaga> repository, ILifetimeScopeRegistry <TId> registry, string name, Action <ContainerBuilder, ConsumeContext> configureScope) { ISagaScopeProvider <TSaga> scopeProvider = new AutofacSagaScopeProvider <TSaga>(new RegistryLifetimeScopeProvider <TId>(registry), name, configureScope); _repository = new ScopeSagaRepository <TSaga>(repository, scopeProvider); }
ISagaRepository <T> ISagaRepositoryFactory.CreateSagaRepository <T>() { var repository = _scopeProvider.LifetimeScope.Resolve <ISagaRepository <T> >(); var scopeProvider = new AutofacSagaScopeProvider <T>(_scopeProvider, _name, _configureScope); return(new ScopeSagaRepository <T>(repository, scopeProvider)); }
public AutofacScopeSagaRepository(ISagaRepository <TSaga> repository, ILifetimeScopeRegistry <TId> registry, string name) { ISagaScopeProvider <TSaga> scopeProvider = new AutofacSagaScopeProvider <TSaga>(new RegistryLifetimeScopeProvider <TId>(registry), name); _repository = new ScopeSagaRepository <TSaga>(repository, scopeProvider); }
public AutofacSagaRepository(ISagaRepository <TSaga> repository, ILifetimeScope scope, Action <ContainerBuilder, ConsumeContext> configureScope, string name = "message") { ISagaScopeProvider <TSaga> scopeProvider = new AutofacSagaScopeProvider <TSaga>(new SingleLifetimeScopeProvider(scope), name, configureScope); _repository = new ScopeSagaRepository <TSaga>(repository, scopeProvider); }
public AutofacSagaRepository(ISagaRepository <TSaga> repository, ILifetimeScope scope, string name = "message") { ISagaScopeProvider <TSaga> scopeProvider = new AutofacSagaScopeProvider <TSaga>(new SingleLifetimeScopeProvider(scope), name); _repository = new ScopeSagaRepository <TSaga>(repository, scopeProvider); }