< Summary

Information
Class: Elsa.Expressions.Liquid.Options.FluidOptions
Assembly: Elsa.Expressions.Liquid
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.Liquid/Options/FluidOptions.cs
Line coverage
80%
Covered lines: 4
Uncovered lines: 1
Coverable lines: 5
Total lines: 36
Line coverage: 80%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_FilterRegistrations()100%11100%
get_ParserConfiguration()100%11100%
get_AllowConfigurationAccess()100%210%
get_Encoder()100%11100%
get_ConfigureFilters()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.Liquid/Options/FluidOptions.cs

#LineLine coverage
 1using System.Text.Encodings.Web;
 2using Elsa.Expressions.Liquid.Services;
 3using Fluid;
 4
 5namespace Elsa.Expressions.Liquid.Options;
 6
 7/// <summary>
 8/// Options for configuring the Liquid templating engine.
 9/// </summary>
 10public class FluidOptions
 11{
 12    /// <summary>
 13    /// A dictionary of filter registrations.
 14    /// </summary>
 315    public Dictionary<string, Type> FilterRegistrations { get; } = new();
 16
 17    /// <summary>
 18    /// A list of parser configurations.
 19    /// </summary>
 120    public IList<Action<LiquidParser>> ParserConfiguration { get; } = new List<Action<LiquidParser>>();
 21
 22    /// <summary>
 23    /// Gets or sets a value indicating whether to allow access to the configuration object.
 24    /// </summary>
 025    public bool AllowConfigurationAccess { get; set; }
 26
 27    /// <summary>
 28    /// Gets or sets the default encoder to use when rendering a template.
 29    /// </summary>
 230    public TextEncoder Encoder { get; set; } = NullEncoder.Default;
 31
 32    /// <summary>
 33    /// Get or set the fluid filters enabled in Elsa.
 34    /// </summary>
 135    public Action<TemplateContext> ConfigureFilters { get; set; } = _ => { };
 36}