< Summary

Information
Class: Elsa.Workflows.Serialization.Converters.SafeValueConverterFactory
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Serialization/Converters/SafeValueConverterFactory.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 19
Line coverage: 100%
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
CanConvert(...)100%11100%
CreateConverter(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Serialization/Converters/SafeValueConverterFactory.cs

#LineLine coverage
 1using System.Text.Json;
 2using System.Text.Json.Serialization;
 3
 4namespace Elsa.Workflows.Serialization.Converters;
 5
 6/// <summary>
 7/// A JSON converter factory that creates <see cref="SafeValueConverterFactory"/> instances.
 8/// </summary>
 9public class SafeValueConverterFactory : JsonConverterFactory
 10{
 11    /// <inheritdoc />
 11412    public override bool CanConvert(Type typeToConvert) => true;
 13
 14    /// <inheritdoc />
 15    public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options)
 16    {
 11417        return new SafeValueConverter();
 18    }
 19}