< Summary

Information
Class: Elsa.Dsl.ElsaScript.Ast.ForNode
Assembly: Elsa.Dsl.ElsaScript
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Dsl.ElsaScript/Ast/ForNode.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 42
Line coverage: 100%
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%11100%
get_VariableName()100%11100%
get_Start()100%11100%
get_End()100%11100%
get_Step()100%11100%
get_IsInclusive()100%11100%
get_Body()100%11100%

File(s)

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

#LineLine coverage
 1namespace Elsa.Dsl.ElsaScript.Ast;
 2
 3/// <summary>
 4/// Represents a range-based for statement (e.g., for (var i = 0 to 10 step 1)).
 5/// </summary>
 6public class ForNode : StatementNode
 7{
 8    /// <summary>
 9    /// Whether this for loop declares a new variable (var present in header).
 10    /// </summary>
 811    public bool DeclaresVariable { get; set; }
 12
 13    /// <summary>
 14    /// The loop variable name.
 15    /// </summary>
 1016    public string VariableName { get; set; } = null!;
 17
 18    /// <summary>
 19    /// The start value expression.
 20    /// </summary>
 721    public ExpressionNode Start { get; set; } = null!;
 22
 23    /// <summary>
 24    /// The end value expression.
 25    /// </summary>
 726    public ExpressionNode End { get; set; } = null!;
 27
 28    /// <summary>
 29    /// The step value expression.
 30    /// </summary>
 731    public ExpressionNode Step { get; set; } = null!;
 32
 33    /// <summary>
 34    /// Whether the end value is inclusive (through) or exclusive (to).
 35    /// </summary>
 836    public bool IsInclusive { get; set; }
 37
 38    /// <summary>
 39    /// The body statement.
 40    /// </summary>
 641    public StatementNode Body { get; set; } = null!;
 42}