示例#1
0
        private void ScanForBundles()
        {
            _logger.Debug("开始搜索 bundle 包...");

            BundleScanner scanner = new BundleScanner();

            IBundle[] bundles = scanner.ScanForBundles(_bundlePath, _context.AvailableAssemblies);
            for (int i = 0; i < bundles.Length; i++)
            {
                AddBundle(bundles[i] as Bundle);
            }

            _logger.DebugFormat("搜索 bundle 包完成. 共 {0} 个.", _bundleById.Count);
        }
示例#2
0
        private void ScanForBundlesInSecondAppDomain()
        {
            _logger.Debug("开始在第二个应用程序域中搜索 bundle 包...");

            BundleScanner scanner = _assemblyLoaderService.CreateAppDomain <BundleScanner>(BundleScannerAppDomainName);

            IBundle[] bundles = scanner.ScanForBundles(_bundlePath, _context.AvailableAssemblies);
            _assemblyLoaderService.UnloadAppDomain(BundleScannerAppDomainName);
            for (int i = 0; i < bundles.Length; i++)
            {
                AddBundle(bundles[i] as Bundle);
            }

            _logger.DebugFormat("在第二个应用程序域中搜索 bundle 包完成,共 {0}个.", _bundleById.Count);
        }