using Microsoft.EntityFrameworkCore; using OliverBooth.Data.Web; using OliverBooth.Extensions.Markdig.Markdown.Template; namespace OliverBooth.Markdown.Template; /// /// Represents a custom renderer which overrides the default behaviour of the template engine. /// internal abstract class CustomTemplateRenderer { /// /// Initializes a new instance of the class. /// /// The service provider. protected CustomTemplateRenderer(IServiceProvider serviceProvider) { DbContextFactory = serviceProvider.GetRequiredService>(); } /// /// Gets the factory that was injected into this instance. /// /// An for . protected IDbContextFactory DbContextFactory { get; } /// /// Renders the specified template. /// /// The template to render. /// The rendered result of the template. public abstract string Render(TemplateInline template); }