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

21 lines
628 B
C#
Raw Normal View History

2025-04-03 13:30:35 +00:00
using Elsa.Common.Codecs;
using Elsa.Common.Services;
using Elsa.Features.Abstractions;
using Elsa.Features.Services;
using JetBrains.Annotations;
using Microsoft.Extensions.DependencyInjection;
namespace Elsa.Common.Features;
[UsedImplicitly]
public class StringCompressionFeature(IModule module) : FeatureBase(module)
2025-04-03 13:30:35 +00:00
{
public override void Apply()
{
Services
.AddSingleton<ICompressionCodecResolver, CompressionCodecResolver>()
.AddSingleton<ICompressionCodec, None>()
.AddSingleton<ICompressionCodec, GZip>()
.AddSingleton<ICompressionCodec, Zstd>();
}
}