< Summary

Information
Class: Elsa.Mediator.Middleware.Request.RequestContext
Assembly: Elsa.Mediator
File(s): /home/runner/work/elsa-core/elsa-core/src/common/Elsa.Mediator/Middleware/Request/RequestContext.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 34
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%
get_Request()100%210%
get_ResponseType()100%210%
get_ServiceProvider()100%210%
get_CancellationToken()100%210%
get_Response()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/common/Elsa.Mediator/Middleware/Request/RequestContext.cs

#LineLine coverage
 1using Elsa.Mediator.Contracts;
 2
 3namespace Elsa.Mediator.Middleware.Request;
 4
 5/// <summary>
 6/// Provides context to a request handler.
 7/// </summary>
 08public class RequestContext(IRequest request, Type responseType, IServiceProvider serviceProvider, CancellationToken can
 9{
 10    /// <summary>
 11    /// Gets the request.
 12    /// </summary>
 013    public IRequest Request { get; init; } = request;
 14
 15    /// <summary>
 16    /// Gets the response type.
 17    /// </summary>
 018    public Type ResponseType { get; init; } = responseType;
 19
 20    /// <summary>
 21    /// Gets the service provider used for resolving dependencies within the request context.
 22    /// </summary>
 023    public IServiceProvider ServiceProvider { get; } = serviceProvider;
 24
 25    /// <summary>
 26    /// Gets the cancellation token.
 27    /// </summary>
 028    public CancellationToken CancellationToken { get; init; } = cancellationToken;
 29
 30    /// <summary>
 31    /// Gets the response the request handler.
 32    /// </summary>
 033    public object Response { get; set; } = null!;
 34}