< Summary

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

#LineLine coverage
 1using Elsa.Mediator.Middleware.Request.Contracts;
 2
 3namespace Elsa.Mediator.Middleware.Request.Components;
 4
 5/// <summary>
 6/// A middleware that logs the request.
 7/// </summary>
 8public class RequestLoggingMiddleware : IRequestMiddleware
 9{
 10    private readonly RequestMiddlewareDelegate _next;
 11
 12    /// <summary>
 13    /// Initializes a new instance of the <see cref="RequestLoggingMiddleware"/> class.
 14    /// </summary>
 15    /// <param name="next">The next middleware in the pipeline.</param>
 016    public RequestLoggingMiddleware(RequestMiddlewareDelegate next) => _next = next;
 17
 18    /// <inheritdoc />
 19    public async ValueTask InvokeAsync(RequestContext context)
 20    {
 21        // Invoke next middleware.
 022        await _next(context);
 023    }
 24}