Class EndpointGovernanceMiddleware
- Namespace
- AsiBackbone.AspNetCore.Endpoints
- Assembly
- AsiBackbone.AspNetCore.dll
Middleware that evaluates AsiBackbone endpoint governance metadata before endpoint execution.
public sealed class EndpointGovernanceMiddleware
- Inheritance
-
EndpointGovernanceMiddleware
- Inherited Members
Constructors
EndpointGovernanceMiddleware(RequestDelegate, IOptions<EndpointGovernanceOptions>)
Initializes a new instance of the EndpointGovernanceMiddleware class.
public EndpointGovernanceMiddleware(RequestDelegate next, IOptions<EndpointGovernanceOptions> endpointOptions)
Parameters
nextRequestDelegateThe next request delegate.
endpointOptionsIOptions<EndpointGovernanceOptions>The endpoint governance options.
Methods
InvokeAsync(HttpContext, IEndpointGovernanceService)
Evaluates endpoint governance metadata and either continues execution or writes a failure result.
public Task InvokeAsync(HttpContext httpContext, IEndpointGovernanceService governanceService)
Parameters
httpContextHttpContextThe current HTTP context.
governanceServiceIEndpointGovernanceServiceThe endpoint governance service.
Returns
- Task
A task that completes when the middleware has run.