Example #1
0
 public WebFormVirtualPathProvider(IDependenciesFolder dependenciesFolder, IExtensionDependenciesManager extensionDependenciesManager, IEnumerable <IExtensionLoader> loaders)
 {
     _dependenciesFolder           = dependenciesFolder;
     _extensionDependenciesManager = extensionDependenciesManager;
     _loaders = loaders;
     Logger   = NullLogger.Instance;
 }
 public ReferencedExtensionLoader(IDependenciesFolder dependenciesFolder, IVirtualPathProvider virtualPathProvider, IBuildManager buildManager)
     : base(dependenciesFolder)
 {
     _virtualPathProvider = virtualPathProvider;
     _buildManager        = buildManager;
     Logger = NullLogger.Instance;
 }
 public ReferencedExtensionLoader(IDependenciesFolder dependenciesFolder, IVirtualPathProvider virtualPathProvider, IBuildManager buildManager)
     : base(dependenciesFolder)
 {
     _virtualPathProvider = virtualPathProvider;
     _buildManager = buildManager;
     Logger = NullLogger.Instance;
 }
        public ImportedExtensionsProvider(
            IDependenciesFolder dependenciesFolder,
            IEnumerable<Assembly> extensions,
            IVirtualPathProvider virtualPathProvider)
            : base(dependenciesFolder)
        {
            // It's not nice to do this in the ctor but this way we spare to implement locking that would be needed with lazy-loading
            // and this class will be instantiated once anyway.
            _extensionsByName = extensions
                .ToDictionary
                (
                    assembly => assembly.ShortName(),
                    assembly => new Extension
                        {
                            Assembly = assembly,
                            Features = assembly
                                .GetExportedTypes()
                                .Where(type => type.GetCustomAttribute(typeof(OrchardFeatureAttribute)) != null)
                                .Select(type => ((OrchardFeatureAttribute)type.GetCustomAttribute(typeof(OrchardFeatureAttribute))).FeatureName)
                                .Union(new[] { assembly.ShortName() })
                                .Distinct()
                        }
                );

            _virtualPathProvider = virtualPathProvider;
        }
        /// <summary>
        /// 初始化一个新的扩展装载机。
        /// </summary>
        /// <param name="dependenciesFolder">依赖文件夹。</param>
        /// <param name="virtualPathProvider">虚拟路提供程序。</param>
        public RawThemeExtensionLoader(IDependenciesFolder dependenciesFolder, IVirtualPathProvider virtualPathProvider)
            : base(dependenciesFolder)
        {
            _virtualPathProvider = virtualPathProvider;

            Logger = NullLogger.Instance;
        }
        public ImportedExtensionsProvider(
            IDependenciesFolder dependenciesFolder,
            IEnumerable <Assembly> extensions,
            IVirtualPathProvider virtualPathProvider)
            : base(dependenciesFolder)
        {
            // It's not nice to do this in the ctor but this way we spare to implement locking that would be needed with lazy-loading
            // and this class will be instantiated once anyway.
            _extensionsByName = extensions
                                .ToDictionary
                                (
                assembly => assembly.ShortName(),
                assembly => new Extension
            {
                Assembly = assembly,
                Features = assembly
                           .GetExportedTypes()
                           .Where(type => type.GetCustomAttribute(typeof(OrchardFeatureAttribute)) != null)
                           .Select(type => ((OrchardFeatureAttribute)type.GetCustomAttribute(typeof(OrchardFeatureAttribute))).FeatureName)
                           .Union(new[] { assembly.ShortName() })
                           .Distinct()
            }
                                );

            _virtualPathProvider = virtualPathProvider;
        }
 public WebFormVirtualPathProvider(IDependenciesFolder dependenciesFolder, IExtensionDependenciesManager extensionDependenciesManager, IEnumerable<IExtensionLoader> loaders)
 {
     _dependenciesFolder = dependenciesFolder;
     _extensionDependenciesManager = extensionDependenciesManager;
     _loaders = loaders;
     Logger = NullLogger.Instance;
 }
Example #8
0
        /// <summary>
        /// 初始化一个新的扩展装载机。
        /// </summary>
        /// <param name="dependenciesFolder">依赖文件夹。</param>
        /// <param name="virtualPathProvider">虚拟路提供程序。</param>
        public RawThemeExtensionLoader(IDependenciesFolder dependenciesFolder, IVirtualPathProvider virtualPathProvider)
            : base(dependenciesFolder)
        {
            _virtualPathProvider = virtualPathProvider;

            Logger = NullLogger.Instance;
        }
        public CoreExtensionLoader(IDependenciesFolder dependenciesFolder, IAssemblyLoader assemblyLoader)
            : base(dependenciesFolder)
        {
            _assemblyLoader = assemblyLoader;

            Logger = NullLogger.Instance;
        }
        public CoreExtensionLoader(IDependenciesFolder dependenciesFolder, IAssemblyLoader assemblyLoader)
            : base(dependenciesFolder)
        {
            _assemblyLoader = assemblyLoader;

            Logger = NullLogger.Instance;
        }
 public AppHostCoreExtensionLoader(
     IDependenciesFolder dependenciesFolder,
     IAssemblyLoader assemblyLoader,
     IExtensionPathsProvider extensionPathsProvider)
     : base(dependenciesFolder, assemblyLoader)
 {
     _extensionPathsProvider = extensionPathsProvider;
 }
 public AppHostCoreExtensionLoader(
     IDependenciesFolder dependenciesFolder,
     IAssemblyLoader assemblyLoader,
     IExtensionPathsProvider extensionPathsProvider)
     : base(dependenciesFolder, assemblyLoader)
 {
     _extensionPathsProvider = extensionPathsProvider;
 }
 public AppHostRawThemeExtensionLoader(
     IDependenciesFolder dependenciesFolder,
     IVirtualPathProvider virtualPathProvider,
     IExtensionPathsProvider extensionPathsProvider)
     : base(dependenciesFolder, virtualPathProvider)
 {
     _virtualPathProvider    = virtualPathProvider;
     _extensionPathsProvider = extensionPathsProvider;
 }
Example #14
0
        /// <summary>
        /// 初始化一个新的扩展装载机。
        /// </summary>
        /// <param name="dependenciesFolder">依赖文件夹。</param>
        /// <param name="assemblyProbingFolder">程序集探测文件夹。</param>
        /// <param name="applicationFolder">应用程序文件夹。</param>
        /// <param name="hostEnvironment">主机环境。</param>
        public PrecompiledExtensionLoader(IDependenciesFolder dependenciesFolder, IHostEnvironment hostEnvironment, IAssemblyProbingFolder assemblyProbingFolder, IApplicationFolder applicationFolder)
            : base(dependenciesFolder)
        {
            _hostEnvironment       = hostEnvironment;
            _assemblyProbingFolder = assemblyProbingFolder;
            _applicationFolder     = applicationFolder;

            Logger = NullLogger.Instance;
        }
 public AppHostRawThemeExtensionLoader(
     IDependenciesFolder dependenciesFolder,
     IVirtualPathProvider virtualPathProvider,
     IExtensionPathsProvider extensionPathsProvider)
     : base(dependenciesFolder, virtualPathProvider)
 {
     _virtualPathProvider = virtualPathProvider;
     _extensionPathsProvider = extensionPathsProvider;
 }
 public DynamicExtensionLoaderAccessor(
     IBuildManager buildManager,
     IVirtualPathProvider virtualPathProvider,
     IVirtualPathMonitor virtualPathMonitor,
     IHostEnvironment hostEnvironment,
     IAssemblyProbingFolder assemblyProbingFolder,
     IDependenciesFolder dependenciesFolder,
     IProjectFileParser projectFileParser)
     : base(buildManager, virtualPathProvider, virtualPathMonitor, hostEnvironment, assemblyProbingFolder, dependenciesFolder, projectFileParser)
 {
 }
 public DefaultRazorCompilationEvents(
     IDependenciesFolder dependenciesFolder,
     IExtensionDependenciesManager extensionDependenciesManager,
     IBuildManager buildManager,
     IEnumerable<IExtensionLoader> loaders,
     IAssemblyLoader assemblyLoader)
 {
     _dependenciesFolder = dependenciesFolder;
     _extensionDependenciesManager = extensionDependenciesManager;
     _buildManager = buildManager;
     _loaders = loaders;
     _assemblyLoader = assemblyLoader;
     Logger = NullLogger.Instance;
 }
 public DefaultRazorCompilationEvents(
     IDependenciesFolder dependenciesFolder,
     IExtensionDependenciesManager extensionDependenciesManager,
     IBuildManager buildManager,
     IEnumerable <IExtensionLoader> loaders,
     IAssemblyLoader assemblyLoader)
 {
     _dependenciesFolder           = dependenciesFolder;
     _extensionDependenciesManager = extensionDependenciesManager;
     _buildManager   = buildManager;
     _loaders        = loaders;
     _assemblyLoader = assemblyLoader;
     Logger          = NullLogger.Instance;
 }
        public PrecompiledExtensionLoader(
            IHostEnvironment hostEnvironment,
            IDependenciesFolder dependenciesFolder,
            IAssemblyProbingFolder assemblyProbingFolder,
            IVirtualPathProvider virtualPathProvider,
            IVirtualPathMonitor virtualPathMonitor)
            : base(dependenciesFolder)
        {
            _hostEnvironment       = hostEnvironment;
            _assemblyProbingFolder = assemblyProbingFolder;
            _virtualPathProvider   = virtualPathProvider;
            _virtualPathMonitor    = virtualPathMonitor;

            Logger = NullLogger.Instance;
        }
        public DefaultExtensionCompiler(
            IVirtualPathProvider virtualPathProvider,
            IProjectFileParser projectFileParser,
            IDependenciesFolder dependenciesFolder,
            IEnumerable<IExtensionLoader> loaders,
            IAssemblyLoader assemblyLoader) {

            _virtualPathProvider = virtualPathProvider;
            _projectFileParser = projectFileParser;
            _dependenciesFolder = dependenciesFolder;
            _loaders = loaders;
            _assemblyLoader = assemblyLoader;

            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
Example #21
0
        public DefaultExtensionCompiler(
            IVirtualPathProvider virtualPathProvider,
            IProjectFileParser projectFileParser,
            IDependenciesFolder dependenciesFolder,
            IEnumerable <IExtensionLoader> loaders,
            IAssemblyLoader assemblyLoader,
            ICriticalErrorProvider criticalErrorProvider)
        {
            _virtualPathProvider   = virtualPathProvider;
            _projectFileParser     = projectFileParser;
            _dependenciesFolder    = dependenciesFolder;
            _loaders               = loaders;
            _assemblyLoader        = assemblyLoader;
            _criticalErrorProvider = criticalErrorProvider;

            Logger = NullLogger.Instance;
        }
        public DynamicExtensionLoader(
            IBuildManager buildManager,
            IVirtualPathProvider virtualPathProvider,
            IVirtualPathMonitor virtualPathMonitor,
            IHostEnvironment hostEnvironment,
            IAssemblyProbingFolder assemblyProbingFolder,
            IDependenciesFolder dependenciesFolder,
            IProjectFileParser projectFileParser)
            : base(dependenciesFolder)
        {
            _buildManager          = buildManager;
            _virtualPathProvider   = virtualPathProvider;
            _virtualPathMonitor    = virtualPathMonitor;
            _hostEnvironment       = hostEnvironment;
            _assemblyProbingFolder = assemblyProbingFolder;
            _projectFileParser     = projectFileParser;
            _dependenciesFolder    = dependenciesFolder;

            Logger = NullLogger.Instance;
        }
        public ExtensionLoaderCoordinator(
            IDependenciesFolder dependenciesFolder,
            IExtensionDependenciesManager extensionDependenciesManager,
            IExtensionManager extensionManager,
            IVirtualPathProvider virtualPathProvider,
            IEnumerable <IExtensionLoader> loaders,
            IHostEnvironment hostEnvironment,
            IParallelCacheContext parallelCacheContext,
            IBuildManager buildManager)
        {
            _dependenciesFolder           = dependenciesFolder;
            _extensionDependenciesManager = extensionDependenciesManager;
            _extensionManager             = extensionManager;
            _virtualPathProvider          = virtualPathProvider;
            _loaders              = loaders.OrderBy(l => l.Order);
            _hostEnvironment      = hostEnvironment;
            _parallelCacheContext = parallelCacheContext;
            _buildManager         = buildManager;

            Logger = NullLogger.Instance;
        }
 protected ExtensionLoaderBase(IDependenciesFolder dependenciesFolder) {
     _dependenciesFolder = dependenciesFolder;
 }
 /// <summary>
 /// 初始化一个新的扩展装载机。
 /// </summary>
 /// <param name="dependenciesFolder">依赖文件夹。</param>
 protected ExtensionLoaderBase(IDependenciesFolder dependenciesFolder)
 {
     _dependenciesFolder = dependenciesFolder;
 }
 public DynamicExtensionLoaderAccessor(
     IBuildManager buildManager,
     IVirtualPathProvider virtualPathProvider,
     IVirtualPathMonitor virtualPathMonitor,
     IHostEnvironment hostEnvironment,
     IAssemblyProbingFolder assemblyProbingFolder,
     IDependenciesFolder dependenciesFolder,
     IProjectFileParser projectFileParser)
     : base(buildManager, virtualPathProvider, virtualPathMonitor, hostEnvironment, assemblyProbingFolder, dependenciesFolder, projectFileParser)
 {
 }
Example #27
0
 public FrameworkExtensionLoader(IDependenciesFolder dependenciesFolder)
     : base(dependenciesFolder)
 {
 }
        /// <summary>
        /// 初始化一个新的扩展装载机。
        /// </summary>
        /// <param name="dependenciesFolder">依赖文件夹。</param>
        /// <param name="assemblyProbingFolder">程序集探测文件夹。</param>
        /// <param name="applicationFolder">应用程序文件夹。</param>
        /// <param name="hostEnvironment">主机环境。</param>
        public PrecompiledExtensionLoader(IDependenciesFolder dependenciesFolder, IHostEnvironment hostEnvironment, IAssemblyProbingFolder assemblyProbingFolder, IApplicationFolder applicationFolder)
            : base(dependenciesFolder)
        {
            _hostEnvironment = hostEnvironment;
            _assemblyProbingFolder = assemblyProbingFolder;
            _applicationFolder = applicationFolder;

            Logger = NullLogger.Instance;
        }
        public PrecompiledExtensionLoader(
            IHostEnvironment hostEnvironment,
            IDependenciesFolder dependenciesFolder,
            IAssemblyProbingFolder assemblyProbingFolder,
            IVirtualPathProvider virtualPathProvider,
            IVirtualPathMonitor virtualPathMonitor)
            : base(dependenciesFolder) {
            _hostEnvironment = hostEnvironment;
            _assemblyProbingFolder = assemblyProbingFolder;
            _virtualPathProvider = virtualPathProvider;
            _virtualPathMonitor = virtualPathMonitor;

            Logger = NullLogger.Instance;
        }
        public DynamicExtensionLoader(
            IBuildManager buildManager,
            IVirtualPathProvider virtualPathProvider,
            IVirtualPathMonitor virtualPathMonitor,
            IHostEnvironment hostEnvironment,
            IAssemblyProbingFolder assemblyProbingFolder,
            IDependenciesFolder dependenciesFolder,
            IProjectFileParser projectFileParser)
            : base(dependenciesFolder) {

            _buildManager = buildManager;
            _virtualPathProvider = virtualPathProvider;
            _virtualPathMonitor = virtualPathMonitor;
            _hostEnvironment = hostEnvironment;
            _assemblyProbingFolder = assemblyProbingFolder;
            _projectFileParser = projectFileParser;
            _dependenciesFolder = dependenciesFolder;

            Logger = NullLogger.Instance;
        }
        public ExtensionLoaderCoordinator(
            IDependenciesFolder dependenciesFolder,
            IExtensionDependenciesManager extensionDependenciesManager,
            IExtensionManager extensionManager,
            IVirtualPathProvider virtualPathProvider,
            IEnumerable<IExtensionLoader> loaders,
            IHostEnvironment hostEnvironment,
            IParallelCacheContext parallelCacheContext,
            IBuildManager buildManager)
        {
            _dependenciesFolder = dependenciesFolder;
            _extensionDependenciesManager = extensionDependenciesManager;
            _extensionManager = extensionManager;
            _virtualPathProvider = virtualPathProvider;
            _loaders = loaders.OrderBy(l => l.Order);
            _hostEnvironment = hostEnvironment;
            _parallelCacheContext = parallelCacheContext;
            _buildManager = buildManager;

            Logger = NullLogger.Instance;
        }