using Microsoft.Extensions.DependencyInjection; using YaeBlog.Core.Abstractions; using YaeBlog.Core.Builder; using YaeBlog.Core.Services; namespace YaeBlog.Core.Extensions; public static class BlogApplicationExtension { public static void UsePreRenderProcessor(this BlogApplication application) where T : IPreRenderProcessor { RendererService rendererService = application.Services.GetRequiredService(); T preRenderProcessor = application.Services.GetRequiredService(); rendererService.AddPreRenderProcessor(preRenderProcessor); } public static void UsePostRenderProcessor(this BlogApplication application) where T : IPostRenderProcessor { RendererService rendererService = application.Services.GetRequiredService(); T postRenderProcessor = application.Services.GetRequiredService(); rendererService.AddPostRenderProcessor(postRenderProcessor); } }