< Summary

Information
Class: Elsa.Expressions.DelegateExpressionHandler
Assembly: Elsa.Expressions
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions/DelegateExpressionHandler.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 17
Line coverage: 100%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
EvaluateAsync()50%22100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions/DelegateExpressionHandler.cs

#LineLine coverage
 1using Elsa.Expressions.Contracts;
 2using Elsa.Expressions.Models;
 3
 4namespace Elsa.Expressions;
 5
 6/// <summary>
 7/// An expression handler for Delegate expressions.
 8/// </summary>
 9public class DelegateExpressionHandler : IExpressionHandler
 10{
 11    /// <inheritdoc />
 12    public async ValueTask<object?> EvaluateAsync(Expression expression, Type returnType, ExpressionExecutionContext con
 13    {
 4014        var value = expression.Value is Func<ExpressionExecutionContext, ValueTask<object?>> @delegate ? await @delegate
 4015        return value;
 4016    }
 17}

Methods/Properties

EvaluateAsync()