< Summary

Information
Class: Elsa.Common.Features.DefaultFormattersFeature
Assembly: Elsa.Common
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/Features/DefaultFormattersFeature.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 17
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%
Configure()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/Features/DefaultFormattersFeature.cs

#LineLine coverage
 1using System.ComponentModel;
 2using Elsa.Common.Serialization;
 3using Elsa.Common.Services;
 4using Elsa.Features.Abstractions;
 5using Elsa.Features.Services;
 6using Microsoft.Extensions.DependencyInjection;
 7
 8namespace Elsa.Common.Features;
 9
 110public class DefaultFormattersFeature(IModule module) : FeatureBase(module)
 11{
 12    public override void Configure()
 13    {
 114        TypeDescriptor.AddAttributes(typeof(Type), new TypeConverterAttribute(typeof(TypeTypeConverter)));
 115        Module.Services.AddSingleton<IFormatter, JsonFormatter>();
 116    }
 17}