< Summary

Information
Class: Elsa.Workflows.Models.Argument
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Models/Argument.cs
Line coverage
75%
Covered lines: 6
Uncovered lines: 2
Coverable lines: 8
Total lines: 37
Line coverage: 75%
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%210%
.ctor(...)100%11100%
.ctor(...)100%11100%
get_MemoryBlockReference()100%11100%

File(s)

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

#LineLine coverage
 1using System.Text.Json.Serialization;
 2using Elsa.Expressions.Models;
 3
 4namespace Elsa.Workflows.Models;
 5
 6/// <summary>
 7/// A base type for the <see cref="Input{T}"/> type.
 8/// </summary>
 9public abstract class Argument
 10{
 11    /// <summary>
 12    /// Initializes a new instance of the <see cref="Argument"/> class.
 13    /// </summary>
 014    protected Argument()
 15    {
 016    }
 17
 18    /// <inheritdoc />
 2688719    protected Argument(MemoryBlockReference memoryBlockReference) : this(() => memoryBlockReference)
 20    {
 945021    }
 22
 23    /// <summary>
 24    /// Initializes a new instance of the <see cref="Argument"/> class.
 25    /// </summary>
 26    /// <param name="memoryBlockReference"></param>
 945027    protected Argument(Func<MemoryBlockReference> memoryBlockReference)
 28    {
 945029        MemoryBlockReference = memoryBlockReference;
 945030    }
 31
 32    /// <summary>
 33    /// Gets or sets the memory block reference.
 34    /// </summary>
 35    [JsonIgnore]
 2709536    public Func<MemoryBlockReference> MemoryBlockReference { get; set; } = null!;
 37}