< Summary

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

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Secrets/ShellFeatures/SecretsFeature.cs

#LineLine coverage
 1using CShells.FastEndpoints.Features;
 2using CShells.Features;
 3using Elsa.Secrets.Extensions;
 4using JetBrains.Annotations;
 5using Microsoft.Extensions.DependencyInjection;
 6
 7namespace Elsa.Secrets.ShellFeatures;
 8
 9[ShellFeature(
 10    DisplayName = "Secrets",
 11    Description = "Provides named secret management, secret stores, and runtime secret resolution.",
 12    DependsOn = ["ElsaFastEndpoints"])]
 13[UsedImplicitly]
 14public class SecretsFeature : IFastEndpointsShellFeature
 15{
 016    public string ConfigurationSectionName { get; set; } = "Elsa:Secrets";
 017    public byte[]? EncryptionKey { get; set; }
 18
 19    public void ConfigureServices(IServiceCollection services)
 20    {
 021        services.AddSecretsServices(options =>
 022        {
 023            options.ConfigurationSectionName = ConfigurationSectionName;
 024            if (EncryptionKey != null)
 025                options.EncryptionKey = EncryptionKey;
 026        });
 027    }
 28}