-
Notifications
You must be signed in to change notification settings - Fork 439
/
LiquidRendererOptions.cs
34 lines (30 loc) · 1.14 KB
/
LiquidRendererOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Text.Encodings.Web;
using Fluid;
using Microsoft.Extensions.FileProviders;
namespace FluentEmail.Liquid
{
public class LiquidRendererOptions
{
/// <summary>
/// Allows configuring template context before running the template. Parameters are context that has been
/// prepared and the model that is going to be used.
/// </summary>
/// <remarks>
/// This API creates dependency on Fluid.
/// </remarks>
public Action<TemplateContext, object>? ConfigureTemplateContext { get; set; }
/// <summary>
/// Text encoder to use. Defaults to <see cref="HtmlEncoder"/>.
/// </summary>
public TextEncoder TextEncoder { get; set; } = HtmlEncoder.Default;
/// <summary>
/// File provider to use, used when resolving references in templates, like master layout.
/// </summary>
public IFileProvider? FileProvider { get; set; }
/// <summary>
/// Set custom Template Options for Fluid
/// </summary>
public TemplateOptions TemplateOptions { get; set; } = new TemplateOptions();
}
}