< Summary

Information
Class: Elsa.Workflows.Runtime.Handlers.CaptureActivityExecutionState
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Handlers/CaptureActivityExecutionState.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 19
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
HandleAsync()100%11100%

File(s)

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

#LineLine coverage
 1using Elsa.Extensions;
 2using Elsa.Mediator.Contracts;
 3using Elsa.Workflows.Notifications;
 4using JetBrains.Annotations;
 5
 6namespace Elsa.Workflows.Runtime.Handlers;
 7
 8/// <summary>
 9/// Captures the execution state of an activity when it completes.
 10/// </summary>
 11[UsedImplicitly]
 12public class CaptureActivityExecutionState : INotificationHandler<ActivityCompleted>
 13{
 14    public async Task HandleAsync(ActivityCompleted notification, CancellationToken cancellationToken)
 15    {
 133416        var context = notification.ActivityExecutionContext;
 133417        await context.CaptureActivityExecutionRecordAsync();
 133418    }
 19}

Methods/Properties

HandleAsync()