< Summary

Information
Class: Elsa.Expressions.JavaScript.TypeDefinitions.Models.ParameterDefinition
Assembly: Elsa.Expressions.JavaScript
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.JavaScript/TypeDefinitions/Models/ParameterDefinition.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 10
Coverable lines: 10
Total lines: 39
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
.ctor()100%210%
.ctor(...)100%210%
get_Name()100%210%
get_Type()100%210%
get_IsOptional()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.JavaScript/TypeDefinitions/Models/ParameterDefinition.cs

#LineLine coverage
 1namespace Elsa.Expressions.JavaScript.TypeDefinitions.Models;
 2
 3/// <summary>
 4/// A method parameter definition.
 5/// </summary>
 6public class ParameterDefinition
 7{
 8    /// <summary>
 9    /// Constructor.
 10    /// </summary>
 011    public ParameterDefinition()
 12    {
 013    }
 14
 15    /// <summary>
 16    /// Constructor.
 17    /// </summary>
 018    public ParameterDefinition(string name, string? type, bool isOptional = false)
 19    {
 020        Name = name;
 021        Type = type;
 022        IsOptional = isOptional;
 023    }
 24
 25    /// <summary>
 26    /// The name of the parameter.
 27    /// </summary>
 028    public string Name { get; set; } = default!;
 29
 30    /// <summary>
 31    /// The type name of the parameter.
 32    /// </summary>
 033    public string? Type { get; set; }
 34
 35    /// <summary>
 36    /// A value indicating whether the parameter is optional or not.
 37    /// </summary>
 038    public bool IsOptional { get; set; }
 39}