< Summary

Information
Class: Elsa.Mediator.Middleware.Notification.Components.NotificationLoggingMiddleware
Assembly: Elsa.Mediator
File(s): /home/runner/work/elsa-core/elsa-core/src/common/Elsa.Mediator/Middleware/Notification/Components/NotificationLoggingMiddleware.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 25
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%
InvokeAsync()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/common/Elsa.Mediator/Middleware/Notification/Components/NotificationLoggingMiddleware.cs

#LineLine coverage
 1using Elsa.Mediator.Middleware.Notification.Contracts;
 2
 3namespace Elsa.Mediator.Middleware.Notification.Components;
 4
 5/// <summary>
 6/// A notification middleware that logs the notification.
 7/// </summary>
 8public class NotificationLoggingMiddleware : INotificationMiddleware
 9{
 10    private readonly NotificationMiddlewareDelegate _next;
 11
 12    /// <summary>
 13    /// Initializes a new instance of the <see cref="NotificationLoggingMiddleware"/> class.
 14    /// </summary>
 015    public NotificationLoggingMiddleware(NotificationMiddlewareDelegate next) => _next = next;
 16
 17    /// <inheritdoc />
 18    public async ValueTask InvokeAsync(NotificationContext context)
 19    {
 20        // TODO: Log notification.
 21
 22        // Invoke next middleware.
 023        await _next(context);
 024    }
 25}