< Summary

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

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Api/Serialization/ArgumentJsonConverterFactory.cs

#LineLine coverage
 1using System.Text.Json;
 2using System.Text.Json.Serialization;
 3using Elsa.Expressions.Contracts;
 4using Elsa.Workflows.Models;
 5
 6namespace Elsa.Workflows.Api.Serialization;
 7
 5888internal class ArgumentJsonConverterFactory(IWellKnownTypeRegistry wellKnownTypeRegistry) : JsonConverterFactory
 9{
 12554610    public override bool CanConvert(Type typeToConvert) => typeToConvert.IsAssignableTo(typeof(ArgumentDefinition));
 11
 12    public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options)
 13    {
 29014        return new ArgumentJsonConverter(wellKnownTypeRegistry);
 15    }
 16}