Table of Contents

Class EndpointRouteExtensions

Namespace
Arbiter.CommandQuery.Endpoints
Assembly
Arbiter.CommandQuery.Endpoints.dll

Extensions for adding Arbiter endpoints to an ASP.NET Core application.

public static class EndpointRouteExtensions
Inheritance
EndpointRouteExtensions
Inherited Members

Methods

AddEndpointRoutes(IServiceCollection)

Adds route endpoints to the specified service collection.

public static IServiceCollection AddEndpointRoutes(this IServiceCollection services)

Parameters

services IServiceCollection

The IServiceCollection to add services to.

Returns

IServiceCollection

The IServiceCollection so that additional calls can be chained.

MapEndpointRoutes(IEndpointRouteBuilder, string, string?)

Maps route endpoints to the specified route builder. Uses service provider to get list of IEndpointRoute instances.

public static IEndpointConventionBuilder MapEndpointRoutes(this IEndpointRouteBuilder endpoints, string prefix = "/api", string? serviceKey = null)

Parameters

endpoints IEndpointRouteBuilder

The IEndpointRouteBuilder to add the route to.

prefix string

Optional route prefix. Default is "/api"

serviceKey string

Optional service key to get list of IEndpointRoute instances from the service provider

Returns

IEndpointConventionBuilder

A IEndpointConventionBuilder that can be used to further customize the endpoint.