< Summary

Information
Class: Elsa.Expressions.Liquid.Helpers.LiquidObjectAccessor<T>
Assembly: Elsa.Expressions.Liquid
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.Liquid/Helpers/LiquidObjectAccessor.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 2
Coverable lines: 2
Total lines: 11
Line coverage: 0%
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
.ctor(...)100%210%
GetValueAsync(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.Liquid/Helpers/LiquidObjectAccessor.cs

#LineLine coverage
 1namespace Elsa.Expressions.Liquid.Helpers;
 2
 3/// <summary>
 4/// Can be used to provide a factory to return an object based on a property name that is unknown at registration time.
 5/// </summary>
 6public class LiquidObjectAccessor<T>
 7{
 8    private readonly Func<string, Task<T>> _getter;
 09    public LiquidObjectAccessor(Func<string, Task<T>> getter) => _getter = getter;
 010    public Task<T> GetValueAsync(string identifier) => _getter(identifier);
 11}