public static void AddSitemapGenerator(this IServiceCollection services, Action <SitemapGeneratorOptions> configurator) { var options = new SitemapGeneratorOptions(); configurator(options); services.AddSingleton <ISitemapGenerator>(new SitemapGenerator(options, services.BuildServiceProvider())); }
public SitemapGenerator(SitemapGeneratorOptions options, IServiceProvider services) { this._options = options; this._services = services; }