< Summary

Information
Class: Elsa.Workflows.Runtime.BookmarksPersister
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Services/BookmarkPersister.cs
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 25
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%
PersistBookmarksAsync()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Services/BookmarkPersister.cs

#LineLine coverage
 1using Elsa.Mediator.Contracts;
 2using Elsa.Workflows.Runtime.Notifications;
 3using Elsa.Workflows.Runtime.Requests;
 4
 5namespace Elsa.Workflows.Runtime;
 6
 7/// <inheritdoc />
 4378public class BookmarksPersister(IBookmarkUpdater bookmarkUpdater, INotificationSender notificationSender) : IBookmarksPe
 9{
 10    /// <inheritdoc />
 11    public async Task PersistBookmarksAsync(UpdateBookmarksRequest updateBookmarksRequest)
 12    {
 46613        await bookmarkUpdater.UpdateBookmarksAsync(updateBookmarksRequest);
 14
 15        // Publish domain event.
 46616        await notificationSender.SendAsync(new WorkflowBookmarksIndexed(new(
 46617            updateBookmarksRequest.WorkflowExecutionContext,
 46618            updateBookmarksRequest.Diff.Added,
 46619            updateBookmarksRequest.Diff.Removed,
 46620            updateBookmarksRequest.Diff.Unchanged)));
 21
 22        // Publish domain event.
 46623        await notificationSender.SendAsync(new WorkflowBookmarksPersisted(updateBookmarksRequest.Diff));
 46624    }
 25}