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);
            }));
        }
        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);
            });
        }
Exemplo n.º 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);
            }));
        }
        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);
             });
        }