Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SimpleInjectorLifetimeScope"/> class.
        /// </summary>
        /// <param name="provider">The provider.</param>
        public SimpleInjectorLifetimeScope(SimpleInjectorDIProvider provider)
        {
            Resolver = provider;

            _scope = AsyncScopedLifestyle.BeginScope(provider.Container);
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SimpleInjectorLifetimeScope"/> class.
        /// </summary>
        /// <param name="provider">The provider.</param>
        public SimpleInjectorLifetimeScope(SimpleInjectorDIProvider provider)
        {
            Container = provider;

            _scope = provider.Container.BeginLifetimeScope();
        }