Class HttpRequestContextEndpointExtensions

Namespace
Cratis.Arc.Http
Assembly
Cratis.Arc.Core.dll

Extension methods for exposing the current endpoint's EndpointMetadata on an IHttpRequestContext.

public static class HttpRequestContextEndpointExtensions
Inheritance
HttpRequestContextEndpointExtensions
Inherited Members

Methods

AllowsAnonymous(IHttpRequestContext)

Gets a value indicating whether the current request's endpoint allows anonymous access.

public static bool AllowsAnonymous(this IHttpRequestContext context)

Parameters

context IHttpRequestContext

The IHttpRequestContext.

Returns

bool

True if the endpoint allows anonymous access, false otherwise.

GetEndpointMetadata(IHttpRequestContext)

Gets the EndpointMetadata for the current request from the context.

public static EndpointMetadata? GetEndpointMetadata(this IHttpRequestContext context)

Parameters

context IHttpRequestContext

The IHttpRequestContext.

Returns

EndpointMetadata

The EndpointMetadata for the matched endpoint, or null if none was set.

SetEndpointMetadata(IHttpRequestContext, EndpointMetadata?)

Sets the EndpointMetadata for the current request on the context.

public static void SetEndpointMetadata(this IHttpRequestContext context, EndpointMetadata? metadata)

Parameters

context IHttpRequestContext

The IHttpRequestContext.

metadata EndpointMetadata

The EndpointMetadata for the matched endpoint, if any.