| | | 1 | | using CShells.Features; |
| | | 2 | | using Elsa.Common.Codecs; |
| | | 3 | | using Elsa.Common.Services; |
| | | 4 | | using Elsa.Platform.PackageManifest.Generator.Hints; |
| | | 5 | | using JetBrains.Annotations; |
| | | 6 | | using Microsoft.Extensions.DependencyInjection; |
| | | 7 | | |
| | | 8 | | namespace Elsa.Common.ShellFeatures; |
| | | 9 | | |
| | | 10 | | [UsedImplicitly] |
| | | 11 | | [ManifestFeatureCategory("Infrastructure")] |
| | | 12 | | [ShellFeature( |
| | | 13 | | "StringCompression", |
| | | 14 | | DisplayName = "String Compression", |
| | | 15 | | Description = "Registers string compression codecs")] |
| | | 16 | | public class StringCompressionFeature : IShellFeature |
| | | 17 | | { |
| | | 18 | | public void ConfigureServices(IServiceCollection services) |
| | | 19 | | { |
| | 0 | 20 | | services |
| | 0 | 21 | | .AddSingleton<ICompressionCodecResolver, CompressionCodecResolver>() |
| | 0 | 22 | | .AddSingleton<ICompressionCodec, None>() |
| | 0 | 23 | | .AddSingleton<ICompressionCodec, GZip>() |
| | 0 | 24 | | .AddSingleton<ICompressionCodec, Zstd>(); |
| | 0 | 25 | | } |
| | | 26 | | } |