BlogSiteServiceExtensions Pennington.BlogSite
DI extension methods for registering and running the BlogSite template.
Methods
AddBlogSite
#public static IServiceCollection AddBlogSite(this IServiceCollection services,
Func<BlogSiteOptions> configureOptions);Registers BlogSite services with the provided options.
Parameters
servicesIServiceCollectionconfigureOptionsFunc<BlogSiteOptions>
Returns
IServiceCollectionRunBlogSiteAsync
#public static async Task RunBlogSiteAsync(this WebApplication app, string[] args);Runs the BlogSite: either serves the app or performs a static build, based on command-line args.
Parameters
appWebApplicationargsstring[]
Returns
TaskUseBlogSite
#public static WebApplication UseBlogSite(this WebApplication app);Wires BlogSite middleware, Razor components, and RSS endpoint into the request pipeline.
Parameters
appWebApplication
Returns
WebApplicationPennington.BlogSite.BlogSiteServiceExtensions
namespace Pennington.BlogSite;
/// DI extension methods for registering and running the BlogSite template.
public class BlogSiteServiceExtensions
{
/// Registers BlogSite services with the provided options.
public static IServiceCollection AddBlogSite(this IServiceCollection services,
Func<BlogSiteOptions> configureOptions);
/// Runs the BlogSite: either serves the app or performs a static build, based on command-line args.
public static async Task RunBlogSiteAsync(this WebApplication app, string[] args);
/// Wires BlogSite middleware, Razor components, and RSS endpoint into the request pipeline.
public static WebApplication UseBlogSite(this WebApplication app);
}