< Summary

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

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Labels/Handlers/DeleteWorkflowLabels.cs

#LineLine coverage
 1using Elsa.Labels.Contracts;
 2using Elsa.Mediator.Contracts;
 3using Elsa.Workflows.Management.Notifications;
 4
 5namespace Elsa.Labels.Handlers;
 6
 7// ReSharper disable once UnusedType.Global
 8/// <summary>
 9/// A handler that removes associated workflow labels in response to workflow definitions being deleted.
 10/// </summary>
 11public class DeleteWorkflowLabels : INotificationHandler<WorkflowDefinitionDeleted>, INotificationHandler<WorkflowDefini
 12{
 13    private readonly IWorkflowDefinitionLabelStore _workflowDefinitionLabelStore;
 014    public DeleteWorkflowLabels(IWorkflowDefinitionLabelStore workflowDefinitionLabelStore) => _workflowDefinitionLabelS
 15
 16    public async Task HandleAsync(WorkflowDefinitionDeleted notification, CancellationToken cancellationToken) =>
 017        await _workflowDefinitionLabelStore.DeleteByWorkflowDefinitionIdAsync(notification.DefinitionId, cancellationTok
 18
 19    public async Task HandleAsync(WorkflowDefinitionsDeleted notification, CancellationToken cancellationToken) =>
 020        await _workflowDefinitionLabelStore.DeleteByWorkflowDefinitionIdsAsync(notification.DefinitionIds, cancellationT
 21}