/// <summary> /// Initializes a new instance of the <see cref="RequestLifetimeScopeProvider"/> class. /// </summary> /// <param name="container">The parent container, usually the application container.</param> public RequestLifetimeScopeProvider(ILifetimeScope container) { if (container == null) { throw new ArgumentNullException("container"); } _container = container; RequestLifetimeHttpModule.SetLifetimeScopeProvider(this); }
/// <summary> /// Initializes a new instance of the <see cref="RequestLifetimeScopeProvider"/> class. /// </summary> /// <param name="container">The parent container, usually the application container.</param> /// <param name="configurationAction">Action on a <see cref="ContainerBuilder"/> /// that adds component registations visible only in HTTP request lifetime scopes.</param> public RequestLifetimeScopeProvider(ILifetimeScope container, Action <ContainerBuilder> configurationAction) { if (container == null) { throw new ArgumentNullException("container"); } _container = container; _configurationAction = configurationAction; RequestLifetimeHttpModule.SetLifetimeScopeProvider(this); }
/// <summary> /// Initializes a new instance of the <see cref="RequestLifetimeScopeProvider"/> class. /// </summary> /// <param name="container">The parent container, usually the application container.</param> public RequestLifetimeScopeProvider(ILifetimeScope container) { _container = container ?? throw new ArgumentNullException(nameof(container)); RequestLifetimeHttpModule.SetLifetimeScopeProvider(this); }