< Summary

Information
Class: Elsa.Workflows.Models.OutputConverterDescriptor
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Models/OutputConverterDescriptor.cs
Line coverage
90%
Covered lines: 18
Uncovered lines: 2
Coverable lines: 20
Total lines: 46
Line coverage: 90%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%22100%
get_Id()100%11100%
get_SourceType()100%11100%
get_ResultType()100%11100%
get_DisplayName()100%210%
get_Description()100%210%
get_SettingsSchema()100%11100%

File(s)

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

#LineLine coverage
 1using System.Text.Json;
 2
 3namespace Elsa.Workflows.Models;
 4
 5/// <summary>
 6/// Describes an output converter without exposing its implementation.
 7/// </summary>
 8public sealed record OutputConverterDescriptor
 9{
 10    /// <summary>
 11    /// Initializes a new instance of the <see cref="OutputConverterDescriptor"/> class.
 12    /// </summary>
 3513    public OutputConverterDescriptor(
 3514        string id,
 3515        Type sourceType,
 3516        Type resultType,
 3517        string displayName,
 3518        string? description = null,
 3519        JsonElement? settingsSchema = null)
 20    {
 3521        Id = id;
 3522        SourceType = sourceType;
 3523        ResultType = resultType;
 3524        DisplayName = displayName;
 3525        Description = description;
 3526        SettingsSchema = settingsSchema?.Clone();
 3527    }
 28
 29    /// <summary>The stable, ordinal case-sensitive converter ID.</summary>
 20930    public string Id { get; }
 31
 32    /// <summary>The declared source type accepted by the converter.</summary>
 7033    public Type SourceType { get; }
 34
 35    /// <summary>The declared result type produced by the converter.</summary>
 7536    public Type ResultType { get; }
 37
 38    /// <summary>The display name exposed through discovery.</summary>
 039    public string DisplayName { get; }
 40
 41    /// <summary>The optional description exposed through discovery.</summary>
 042    public string? Description { get; }
 43
 44    /// <summary>An immutable optional JSON Schema for per-binding settings.</summary>
 1245    public JsonElement? SettingsSchema { get; }
 46}