< Summary

Information
Class: Elsa.Workflows.Models.OutputConversionContext
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Models/OutputConversionContext.cs
Line coverage
80%
Covered lines: 8
Uncovered lines: 2
Coverable lines: 10
Total lines: 32
Line coverage: 80%
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_Value()100%11100%
get_SourceType()100%210%
get_DestinationType()100%210%
get_Settings()100%11100%

File(s)

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

#LineLine coverage
 1using System.Text.Json;
 2
 3namespace Elsa.Workflows.Models;
 4
 5/// <summary>
 6/// Provides the immutable values available to an output converter.
 7/// </summary>
 8public sealed record OutputConversionContext
 9{
 10    /// <summary>
 11    /// Initializes a new instance of the <see cref="OutputConversionContext"/> class.
 12    /// </summary>
 1113    public OutputConversionContext(object value, Type sourceType, Type destinationType, JsonElement? settings)
 14    {
 1115        Value = value;
 1116        SourceType = sourceType;
 1117        DestinationType = destinationType;
 1118        Settings = settings?.Clone();
 1119    }
 20
 21    /// <summary>The non-null native activity output.</summary>
 522    public object Value { get; }
 23
 24    /// <summary>The activity output's declared type.</summary>
 025    public Type SourceType { get; }
 26
 27    /// <summary>The binding destination's declared type.</summary>
 028    public Type DestinationType { get; }
 29
 30    /// <summary>A clone of the optional per-binding JSON settings.</summary>
 131    public JsonElement? Settings { get; }
 32}