< Summary

Information
Class: Elsa.Workflows.Services.ActivityLoggerStateGenerator
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Services/ActivityLoggerStateGenerator.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 20
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
GenerateLoggerState(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Services/ActivityLoggerStateGenerator.cs

#LineLine coverage
 1namespace Elsa.Workflows.Services;
 2
 3/// <summary>
 4/// Generates logger state for the specified <see cref="ActivityExecutionContext"/>.
 5/// </summary>
 6public class ActivityLoggerStateGenerator : ILoggerStateGenerator<ActivityExecutionContext>
 7{
 8    /// <summary>
 9    /// Generates logger state for the specified <see cref="ActivityExecutionContext"/>.
 10    /// </summary>
 11    /// <param name="activityExecutionContext">The <see cref="ActivityExecutionContext"/> to generate logger state for.<
 12    /// <returns>A <see cref="Dictionary{String, Object}" /> containing the state related to the <see cref="ActivityExec
 13    public Dictionary<string, object> GenerateLoggerState(ActivityExecutionContext activityExecutionContext)
 14    {
 301915        return new()
 301916        {
 301917            ["ActivityInstanceId"] = activityExecutionContext.Id
 301918        };
 19    }
 20}