public DefaultLifetimeScopeProvider(ILifetimeScopeAccessor accessor)
		{
			Guard.ArgumentNotNull(() => accessor);

			this._accessor = accessor;
			AutofacRequestLifetimeHttpModule.SetLifetimeScopeProvider(this);
		}
コード例 #2
0
        public DefaultLifetimeScopeProvider(ILifetimeScopeAccessor accessor)
        {
            Guard.ArgumentNotNull(() => accessor);

            this._accessor = accessor;
            AutofacRequestLifetimeHttpModule.SetLifetimeScopeProvider(this);
        }
コード例 #3
0
        public DefaultLifetimeScopeProvider(ILifetimeScopeAccessor accessor)
        {
            Guard.NotNull(accessor, nameof(accessor));

            this._accessor = accessor;
            AutofacRequestLifetimeHttpModule.SetLifetimeScopeProvider(this);
        }
コード例 #4
0
ファイル: AsyncRunner.cs プロジェクト: naguvan/Smartstore
        public AsyncRunner(IHostApplicationLifetime appLifetime, ILifetimeScopeAccessor scopeAccessor)
        {
            _appLifetime   = appLifetime;
            _scopeAccessor = scopeAccessor;

            _appLifetime.ApplicationStopping.Register(OnAppShutdown);
            AppShutdownCancellationToken = _appLifetime.ApplicationStopping;
        }
コード例 #5
0
        public ScopedServiceContainer(ILifetimeScopeAccessor scopeAccessor, IHttpContextAccessor httpContextAccessor, ILifetimeScope rootContainer)
        {
            Guard.NotNull(scopeAccessor, nameof(scopeAccessor));
            Guard.NotNull(httpContextAccessor, nameof(httpContextAccessor));
            Guard.NotNull(rootContainer, nameof(rootContainer));

            _scopeAccessor       = scopeAccessor;
            _httpContextAccessor = httpContextAccessor;
            _rootContainer       = rootContainer;
        }
コード例 #6
0
ファイル: DataImporter.cs プロジェクト: smartstore/Smartstore
 public DataImporter(
     ICommonServices services,
     ILifetimeScopeAccessor scopeAccessor,
     IImportProfileService importProfileService,
     ILanguageService languageService,
     IEmailAccountService emailAccountService,
     IMailService mailService,
     ContactDataSettings contactDataSettings,
     DataExchangeSettings dataExchangeSettings)
 {
     _services             = services;
     _scopeAccessor        = scopeAccessor;
     _importProfileService = importProfileService;
     _languageService      = languageService;
     _emailAccountService  = emailAccountService;
     _mailService          = mailService;
     _contactDataSettings  = contactDataSettings;
     _dataExchangeSettings = dataExchangeSettings;
 }
コード例 #7
0
 public ConsumerInvoker(IConsumerResolver resolver, ILifetimeScopeAccessor scopeAccessor, AsyncRunner asyncRunner)
 {
     _resolver      = resolver;
     _scopeAccessor = scopeAccessor;
     _asyncRunner   = asyncRunner;
 }
コード例 #8
0
 public DefaultLifetimeScopeProvider(ILifetimeScopeAccessor accessor)
 {
     this._accessor = accessor;
     AutofacRequestLifetimeHttpModule.SetLifetimeScopeProvider(this);
 }
コード例 #9
0
 public AutofacWebApiDependencyResolver()
 {
     _container           = EngineContext.Current.ContainerManager.Container;
     _accessor            = _container.Resolve <ILifetimeScopeAccessor>();
     _rootDependencyScope = new AutofacWebApiDependencyScope(_container);
 }