Exemplo n.º 1
0
        public static void AddSitemapGenerator(this IServiceCollection services, Action <SitemapGeneratorOptions> configurator)
        {
            var options = new SitemapGeneratorOptions();

            configurator(options);

            services.AddSingleton <ISitemapGenerator>(new SitemapGenerator(options, services.BuildServiceProvider()));
        }
Exemplo n.º 2
0
 public SitemapGenerator(SitemapGeneratorOptions options, IServiceProvider services)
 {
     this._options  = options;
     this._services = services;
 }