Example #1
0
        /// <summary>
        /// 激活外壳。
        /// </summary>
        public void Activate()
        {
            using (var scope = _lifetimeScope.CreateWorkContextScope())
            {
                foreach (var shellEventse in scope.Resolve <IEnumerable <IShellEvents> >())
                {
                    shellEventse.Activated();
                }
            }

            _sweepGenerator.Activate();
        }
Example #2
0
        /// <summary>
        /// Creates a work context scope for the specified tenant.
        /// </summary>
        /// <param name="tenant">The name of the tenant.</param>
        /// <returns>The created <see cref="IWorkContextScope"/>.</returns>
        protected IWorkContextScope CreateWorkContextScope(string tenant)
        {
            ILifetimeScope tenantContainer = this.ContainerManager.GetTenantContainer(tenant);

            return(tenantContainer.CreateWorkContextScope());
        }