< Summary

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

File(s)

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

#LineLine coverage
 1using System.ComponentModel;
 2using CShells.Features;
 3using Elsa.Common.Serialization;
 4using Elsa.Common.Services;
 5using Microsoft.Extensions.DependencyInjection;
 6
 7namespace Elsa.Common.ShellFeatures;
 8
 9[ShellFeature("DefaultFormatters")]
 10public class DefaultFormattersFeature : IShellFeature
 11{
 12    public void ConfigureServices(IServiceCollection services)
 13    {
 014        TypeDescriptor.AddAttributes(typeof(Type), new TypeConverterAttribute(typeof(TypeTypeConverter)));
 015        services.AddSingleton<IFormatter, JsonFormatter>();
 016    }
 17}