< 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: 22
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 Elsa.Platform.PackageManifest.Generator.Hints;
 6using Microsoft.Extensions.DependencyInjection;
 7
 8namespace Elsa.Common.ShellFeatures;
 9
 10[ManifestFeatureCategory("Infrastructure")]
 11[ShellFeature(
 12    "DefaultFormatters",
 13    DisplayName = "Default Formatters",
 14    Description = "Registers default serializers and type converters")]
 15public class DefaultFormattersFeature : IShellFeature
 16{
 17    public void ConfigureServices(IServiceCollection services)
 18    {
 019        TypeDescriptor.AddAttributes(typeof(Type), new TypeConverterAttribute(typeof(TypeTypeConverter)));
 020        services.AddSingleton<IFormatter, JsonFormatter>();
 021    }
 22}