예제 #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()));
        }
예제 #2
0
 public SitemapGenerator(SitemapGeneratorOptions options, IServiceProvider services)
 {
     this._options  = options;
     this._services = services;
 }