< Summary

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

File(s)

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

#LineLine coverage
 1using Elsa.Common.Codecs;
 2using Elsa.Common.Services;
 3using Elsa.Features.Abstractions;
 4using Elsa.Features.Services;
 5using JetBrains.Annotations;
 6using Microsoft.Extensions.DependencyInjection;
 7
 8namespace Elsa.Common.Features;
 9
 10[UsedImplicitly]
 111public class StringCompressionFeature(IModule module) : FeatureBase(module)
 12{
 13    public override void Apply()
 14    {
 115        Services
 116            .AddSingleton<ICompressionCodecResolver, CompressionCodecResolver>()
 117            .AddSingleton<ICompressionCodec, None>()
 118            .AddSingleton<ICompressionCodec, GZip>()
 119            .AddSingleton<ICompressionCodec, Zstd>();
 120    }
 21}