< Summary

Information
Class: Elsa.Workflows.LogPersistence.Strategies.Configuration
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/LogPersistence/Strategies/Configuration.cs
Line coverage
50%
Covered lines: 1
Uncovered lines: 1
Coverable lines: 2
Total lines: 16
Line coverage: 50%
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%
GetPersistenceModeAsync(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/LogPersistence/Strategies/Configuration.cs

#LineLine coverage
 1using JetBrains.Annotations;
 2using Microsoft.Extensions.Options;
 3
 4namespace Elsa.Workflows.LogPersistence.Strategies;
 5
 6/// <summary>
 7/// A log persistence strategy that uses the configured persistence mode.
 8/// </summary>
 9[UsedImplicitly]
 43410public class Configuration(IOptions<LogPersistenceOptions> options) : ILogPersistenceStrategy
 11{
 12    public Task<LogPersistenceMode> GetPersistenceModeAsync(LogPersistenceStrategyContext context)
 13    {
 014        return Task.FromResult(options.Value.ConfiguredPersistenceMode);
 15    }
 16}