< Summary

Information
Class: Elsa.Workflows.Models.VariableModel
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Models/VariableModel.cs
Line coverage
100%
Covered lines: 14
Uncovered lines: 0
Coverable lines: 14
Total lines: 54
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
.ctor()100%11100%
.ctor(...)100%11100%
get_Id()100%11100%
get_Name()100%11100%
get_TypeName()100%11100%
get_Value()100%11100%
get_StorageDriverTypeName()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Models/VariableModel.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2
 3namespace Elsa.Workflows.Models;
 4
 5/// <summary>
 6/// Represents a shape of a variable that can be serialized.
 7/// </summary>
 8public class VariableModel
 9{
 10    /// <summary>
 11    /// Initializes a new instance of the <see cref="VariableModel"/> class.
 12    /// </summary>
 13    [JsonConstructor]
 33914    public VariableModel()
 15    {
 33916    }
 17
 18    /// <summary>
 19    /// Initializes a new instance of the <see cref="VariableModel"/> class.
 20    /// </summary>
 18821    public VariableModel(string id, string name, string typeName, string? value, string? storageDriverTypeName)
 22    {
 18823        Id = id;
 18824        Name = name;
 18825        TypeName = typeName;
 18826        Value = value;
 18827        StorageDriverTypeName = storageDriverTypeName;
 18828    }
 29
 30    /// <summary>
 31    /// Gets or sets the ID of the variable.
 32    /// </summary>
 105433    public string Id { get; set; } = default!;
 34
 35    /// <summary>
 36    /// Gets or sets the name of the variable.
 37    /// </summary>
 105438    public string Name { get; set; } = default!;
 39
 40    /// <summary>
 41    /// Gets or sets the type name of the variable.
 42    /// </summary>
 139343    public string TypeName { get; set; } = default!;
 44
 45    /// <summary>
 46    /// Gets or sets the value of the variable.
 47    /// </summary>
 91248    public string? Value { get; set; }
 49
 50    /// <summary>
 51    /// Gets or sets the storage driver type name of the variable.
 52    /// </summary>
 133553    public string? StorageDriverTypeName { get; set; }
 54}