API reference
Method MapDisCatSharpIngress
- Namespace
- DisCatSharp.Hosting.AspNetCore
- Assembly
- DisCatSharp.Hosting.AspNetCore.dll
MapDisCatSharpIngress(IEndpointRouteBuilder)
Maps the default DisCatSharp ingress surface under the configured route prefix.
public static RouteGroupBuilder MapDisCatSharpIngress(this IEndpointRouteBuilder endpoints)
Parameters
endpointsIEndpointRouteBuilderThe endpoint route builder to update.
Returns
- RouteGroupBuilder
The configured ingress route group.
Examples
var app = builder.Build();
app.MapDisCatSharpIngress();
Remarks
This convenience method preserves the package's default route composition by mapping the OAuth, interactions, and webhook surfaces beneath RoutePrefix.
The resulting endpoints retain stable names from DiscordIngressEndpointNames and attach DiscordIngressEndpointMetadata so deployment tooling can inspect the logical ingress surface after route groups have been composed.
Exceptions
- ArgumentNullException
endpointsis null.- InvalidOperationException
DisCatSharp ASP.NET Core ingress services have not been registered on the application's service provider.