Skip to content

Class ApiRoutesOptions

Namespace: Cephalon.AspNetCore.Hosting
Assembly: Cephalon.AspNetCore.dll

Configures host-level HTTP route prefixes for Cephalon ASP.NET Core transports.

public sealed class ApiRoutesOptions

objectApiRoutesOptions

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

These settings describe the public HTTP surface of the ASP.NET Core adapter. They intentionally stay out of the engine core.

Initializes a new with the canonical Cephalon route-prefix defaults.

public ApiRoutesOptions()

Gets the configuration section used for API route settings.

public const string SectionName = "ApiRoutes"

string

Gets or sets the default document/version segment projected into generic behavior transport routes.

public string DefaultBehaviorDocumentName { get; set; }

string

Gets or sets the root prefix used by the built-in GraphQL transport mapper.

public string GraphQLPrefix { get; set; }

string

Gets or sets the canonical prefix used by the generic behavior GraphQL-over-SSE binding surface.

public string GraphQLSsePrefix { get; set; }

string

Gets or sets the canonical prefix used by the generic behavior GraphQL-over-WebSocket binding surface.

public string GraphQLWsPrefix { get; set; }

string

Gets or sets the root prefix used by the built-in gRPC transport mapper.

public string GrpcPrefix { get; set; }

string

Gets or sets the canonical prefix used by the generic behavior JSON-RPC binding surface.

public string JsonRpcPrefix { get; set; }

string

Gets or sets the root prefix used by the built-in REST transport mapper.

public string RestPrefix { get; set; }

string

Gets or sets the canonical prefix used by the generic behavior Server-Sent Events binding surface.

public string SsePrefix { get; set; }

string

Gets or sets a value indicating whether behavior-aware REST endpoints should emit the Cephalon result envelope.

public bool UseResultModelEnvelope { get; set; }

bool

Gets or sets the canonical prefix used by the generic behavior WebSocket binding surface.

public string WsPrefix { get; set; }

string

FromConfiguration(IConfiguration, string)

Section titled “ FromConfiguration(IConfiguration, string)”

Binds and normalizes API route settings from configuration.

public static ApiRoutesOptions FromConfiguration(IConfiguration configuration, string sectionPath = "ApiRoutes")

configuration IConfiguration

The application configuration root.

sectionPath string

The configuration section path to bind.

ApiRoutesOptions

The normalized route settings.