< Summary

Information
Class: Elsa.Workflows.Runtime.ActivityExecutionContextExtensions
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/LogPersistence/Extensions/ActivityExecutionContextExtensions.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 23
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
get_LogPersistenceMapKey()100%11100%
HasLogPersistenceModeMap(...)100%11100%
GetLogPersistenceModeMap(...)100%11100%
SetLogPersistenceModeMap(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/LogPersistence/Extensions/ActivityExecutionContextExtensions.cs

#LineLine coverage
 1using Elsa.Extensions;
 2
 3namespace Elsa.Workflows.Runtime;
 4
 5public static class ActivityExecutionContextExtensions
 6{
 107227    private static object LogPersistenceMapKey { get; } = new();
 8
 9    public static bool HasLogPersistenceModeMap(this ActivityExecutionContext context)
 10    {
 313611        return context.TransientProperties.ContainsKey(LogPersistenceMapKey);
 12    }
 13
 14    public static ActivityLogPersistenceModeMap GetLogPersistenceModeMap(this ActivityExecutionContext context)
 15    {
 387516        return context.TransientProperties.GetValueOrDefault(LogPersistenceMapKey, () => new ActivityLogPersistenceModeM
 17    }
 18
 19    public static void SetLogPersistenceModeMap(this ActivityExecutionContext context, ActivityLogPersistenceModeMap map
 20    {
 375121        context.TransientProperties[LogPersistenceMapKey] = map;
 375122    }
 23}