コード例 #1
0
        public static IServiceCollection AddModuleFolder(
            [NotNull] this IServiceCollection services,
            [NotNull] string virtualPath)
        {
            return(services.Configure <ExtensionHarvestingOptions>(options => {
                var expander = new ModuleLocationExpander(
                    DefaultExtensionTypes.Module,
                    new[] { virtualPath },
                    "Module.txt"
                    );

                options.ModuleLocationExpanders.Add(expander);
            }));
        }
コード例 #2
0
        public static IServiceCollection AddModuleFolder(
            [NotNull] this IServiceCollection services,
            [NotNull] string virtualPath)
        {
            return services.Configure<ExtensionHarvestingOptions>(options => {
                var expander = new ModuleLocationExpander(
                    DefaultExtensionTypes.Module,
                    new[] { virtualPath },
                    "Module.txt"
                    );

                options.ModuleLocationExpanders.Add(expander);
            });
        }
コード例 #3
0
        public static IServiceCollection AddThemeFolder(
            this IServiceCollection services,
            string virtualPath)
        {
            return(services.Configure <ExtensionHarvestingOptions>(configureOptions: options =>
            {
                var expander = new ModuleLocationExpander(
                    DefaultExtensionTypes.Theme,
                    new[] { virtualPath },
                    "Theme.txt"
                    );

                options.ModuleLocationExpanders.Add(expander);
            }));
        }
コード例 #4
0
        public static IServiceCollection AddThemeFolder(
            this IServiceCollection services,
            string virtualPath)
        {
            return services.Configure<ExtensionHarvestingOptions>(configureOptions: options =>
             {
                 var expander = new ModuleLocationExpander(
                     DefaultExtensionTypes.Theme,
                     new[] { virtualPath },
                     "Theme.txt"
                     );

                 options.ModuleLocationExpanders.Add(expander);
             });
        }