public static IServiceCollection AddModuleFolder(
            this IServiceCollection services,
            string virtualPath)
        {
            return services.Configure<ExtensionHarvestingOptions>(configureOptions: options =>
            {
                var expander = new ExtensionLocationExpander(
                    DefaultExtensionTypes.Module,
                    new[] { virtualPath },
                    "Module.txt"
                    );

                options.ExtensionLocationExpanders.Add(expander);
            });
        }
Пример #2
0
        public static IServiceCollection AddModuleFolder(
            this IServiceCollection services,
            string virtualPath)
        {
            return(services.Configure <ExtensionHarvestingOptions>(configureOptions: options =>
            {
                var expander = new ExtensionLocationExpander(
                    DefaultExtensionTypes.Module,
                    new[] { virtualPath },
                    "Module.txt"
                    );

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