< Summary

Information
Class: Elsa.Workflows.Runtime.Handlers.EvaluateParentLogPersistenceModes
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/LogPersistence/Handlers/EvaluateParentInputProperties.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 17
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
HandleAsync()100%22100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/LogPersistence/Handlers/EvaluateParentInputProperties.cs

#LineLine coverage
 1using Elsa.Mediator.Contracts;
 2using Elsa.Workflows.Notifications;
 3
 4namespace Elsa.Workflows.Runtime.Handlers;
 5
 4676public class EvaluateParentLogPersistenceModes(IActivityPropertyLogPersistenceEvaluator persistenceEvaluator) : INotific
 7{
 8    public async Task HandleAsync(InvokingActivityCallback notification, CancellationToken cancellationToken)
 9    {
 10        // Before invoking the parent activity, make sure its persistence log properties are evaluated.
 313611        if (!notification.Parent.HasLogPersistenceModeMap())
 12        {
 9713            var persistenceLogMap = await persistenceEvaluator.EvaluateLogPersistenceModesAsync(notification.Parent);
 9714            notification.Parent.SetLogPersistenceModeMap(persistenceLogMap);
 15        }
 313616    }
 17}