oliverbooth.dev/OliverBooth/Services/ITemplateService.cs

32 lines
1.2 KiB
C#
Raw Normal View History

2023-08-13 18:02:19 +01:00
using OliverBooth.Data;
using OliverBooth.Markdown.Template;
namespace OliverBooth.Services;
/// <summary>
/// Represents a service that renders MediaWiki-style templates.
/// </summary>
public interface ITemplateService
{
/// <summary>
2023-08-13 18:02:19 +01:00
/// Renders the specified global template with the specified arguments.
/// </summary>
2023-08-13 18:02:19 +01:00
/// <param name="templateInline">The global template to render.</param>
/// <returns>The rendered global template.</returns>
/// <exception cref="ArgumentNullException">
/// <paramref name="templateInline" /> is <see langword="null" />.
/// </exception>
2023-08-13 18:02:19 +01:00
string RenderGlobalTemplate(TemplateInline templateInline);
/// <summary>
/// Renders the specified global template with the specified arguments.
/// </summary>
/// <param name="templateInline">The global template to render.</param>
/// <param name="template">The database template object.</param>
/// <returns>The rendered global template.</returns>
/// <exception cref="ArgumentNullException">
/// <paramref name="templateInline" /> is <see langword="null" />.
/// </exception>
string RenderTemplate(TemplateInline templateInline, ITemplate? template);
}