< Summary

Information
Class: Elsa.Api.Client.Resources.WorkflowDefinitions.Models.Variable
Assembly: Elsa.Api.Client
File(s): /home/runner/work/elsa-core/elsa-core/src/clients/Elsa.Api.Client/Resources/WorkflowDefinitions/Models/Variable.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 42
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Id()100%210%
get_Name()100%210%
get_TypeName()100%210%
get_IsArray()100%210%
get_Value()100%210%
get_StorageDriverTypeName()100%210%
GetTypeDisplayName()0%620%

File(s)

/home/runner/work/elsa-core/elsa-core/src/clients/Elsa.Api.Client/Resources/WorkflowDefinitions/Models/Variable.cs

#LineLine coverage
 1namespace Elsa.Api.Client.Resources.WorkflowDefinitions.Models;
 2
 3/// <summary>
 4/// Represents a workflow variable.
 5/// </summary>
 6public class Variable
 7{
 8    /// <summary>
 9    /// The ID of the variable.
 10    /// </summary>
 011    public string Id { get; set; } = null!;
 12
 13    /// <summary>
 14    /// The name of the variable.
 15    /// </summary>
 016    public string Name { get; set; } = null!;
 17
 18    /// <summary>
 19    /// The type name of the variable.
 20    /// </summary>
 021    public string TypeName { get; set; } = null!;
 22
 23    /// <summary>
 24    /// Indicates whether the variable is an array.
 25    /// </summary>
 026    public bool IsArray { get; set; }
 27
 28    /// <summary>
 29    /// The default value of the variable.
 30    /// </summary>
 031    public object? Value { get; set; }
 32
 33    /// <summary>
 34    /// The storage driver type to use for persistence.
 35    /// </summary>
 036    public string? StorageDriverTypeName { get; set; }
 37
 38    /// <summary>
 39    /// The type name of the variable, including the array indicator.
 40    /// </summary>
 041    public string GetTypeDisplayName() => IsArray ? $"{TypeName}[]" : TypeName;
 42}