< Summary

Information
Class: Elsa.Dsl.ElsaScript.Ast.ForEachNode
Assembly: Elsa.Dsl.ElsaScript
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Dsl.ElsaScript/Ast/ForEachNode.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 27
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
get_DeclaresVariable()100%210%
get_VariableName()100%210%
get_Collection()100%210%
get_Body()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Dsl.ElsaScript/Ast/ForEachNode.cs

#LineLine coverage
 1namespace Elsa.Dsl.ElsaScript.Ast;
 2
 3/// <summary>
 4/// Represents a foreach statement (e.g., foreach (var item in collection)).
 5/// </summary>
 6public class ForEachNode : StatementNode
 7{
 8    /// <summary>
 9    /// Whether this foreach loop declares a new variable (var present in header).
 10    /// </summary>
 011    public bool DeclaresVariable { get; set; }
 12
 13    /// <summary>
 14    /// The loop variable name.
 15    /// </summary>
 016    public string VariableName { get; set; } = null!;
 17
 18    /// <summary>
 19    /// The collection expression to iterate over.
 20    /// </summary>
 021    public ExpressionNode Collection { get; set; } = null!;
 22
 23    /// <summary>
 24    /// The body statement.
 25    /// </summary>
 026    public StatementNode Body { get; set; } = null!;
 27}