< Summary

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

File(s)

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

#LineLine coverage
 1namespace Elsa.Expressions.JavaScript.TypeDefinitions.Models;
 2
 3/// <summary>
 4/// A method definition.
 5/// </summary>
 6public class FunctionDefinition
 7{
 8    /// <summary>
 9    /// Constructor.
 10    /// </summary>
 011    public FunctionDefinition()
 12    {
 013    }
 14
 15    /// <summary>
 16    /// Constructor.
 17    /// </summary>
 018    public FunctionDefinition(string name, IEnumerable<ParameterDefinition> parameters)
 19    {
 020        Name = name;
 021        Parameters = parameters.ToList();
 022    }
 23
 24    /// <summary>
 25    /// Constructor.
 26    /// </summary>
 027    public FunctionDefinition(string name, string? returnType, IEnumerable<ParameterDefinition> parameters)
 28    {
 029        Name = name;
 030        ReturnType = returnType;
 031        Parameters = parameters.ToList();
 032    }
 33
 34    /// <summary>
 35    /// The name of the method.
 36    /// </summary>
 037    public string Name { get; set; } = default!;
 38
 39    /// <summary>
 40    /// The return type name of the method.
 41    /// </summary>
 042    public string? ReturnType { get; set; }
 43
 44    /// <summary>
 45    /// The parameters of the method.
 46    /// </summary>
 047    public ICollection<ParameterDefinition> Parameters { get; set; } = new List<ParameterDefinition>();
 48}