Ejemplo n.º 1
0
        public AutofacConsumerFactory(ILifetimeScope scope, string name, Action <ContainerBuilder, ConsumeContext> configureScope)
        {
            IConsumerScopeProvider scopeProvider = new AutofacConsumerScopeProvider(new SingleLifetimeScopeProvider(scope), name, configureScope);

            _factory = new ScopeConsumerFactory <TConsumer>(scopeProvider);
        }
Ejemplo n.º 2
0
        public AutofacConsumerFactory(ILifetimeScope scope, string name)
        {
            IConsumerScopeProvider scopeProvider = new AutofacConsumerScopeProvider(new SingleLifetimeScopeProvider(scope), name);

            _factory = new ScopeConsumerFactory <TConsumer>(scopeProvider);
        }