< Summary

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

File(s)

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

#LineLine coverage
 1using Elsa.Mediator.Contracts;
 2using Elsa.Workflows.Management.Notifications;
 3using Elsa.Workflows.Runtime.Filters;
 4using JetBrains.Annotations;
 5
 6namespace Elsa.Workflows.Runtime.Handlers;
 7
 8/// <summary>
 9/// Deletes bookmarks for workflow instances being deleted.
 10/// </summary>
 11[UsedImplicitly]
 46712public class DeleteBookmarks(IBookmarkManager bookmarkManager) : INotificationHandler<WorkflowInstancesDeleting>
 13{
 14    /// <inheritdoc />
 15    public async Task HandleAsync(WorkflowInstancesDeleting notification, CancellationToken cancellationToken)
 16    {
 1317        await bookmarkManager.DeleteManyAsync(new()
 1318        {
 1319            WorkflowInstanceIds = notification.Ids
 1320        }, cancellationToken);
 1321    }
 22}