Table of Contents
API reference

Method Create

Namespace
DisCatSharp.Hosting.AspNetCore.Routing
Assembly
DisCatSharp.Hosting.AspNetCore.dll

Create(Uri, DiscordAspNetCoreIngressOptions?, DiscordLinkedRolesOptions?)

Creates a public URL snapshot from the supplied base URL and ingress options.

public static DiscordIngressPublicUrls Create(Uri baseUrl, DiscordAspNetCoreIngressOptions? options = null, DiscordLinkedRolesOptions? linkedRolesOptions = null)

Parameters

baseUrl Uri

The externally visible base URL for the ASP.NET Core app.

options DiscordAspNetCoreIngressOptions

The ingress route options. Defaults to the package defaults when omitted.

linkedRolesOptions DiscordLinkedRolesOptions

The optional linked-roles route options.

Returns

DiscordIngressPublicUrls

The resolved public ingress URLs.

Remarks

The supplied baseUrl may already contain a path base such as https://example.com/base; the ingress route prefix and endpoint segments are appended beneath that existing path.

Linked-roles verification URLs deliberately remain outside the ingress route prefix so they can be published independently from the signed interactions and webhook endpoints.

Exceptions

ArgumentNullException

baseUrl is null.

ArgumentException

baseUrl is not absolute, contains a query or fragment component, or one of the configured route segments is empty after normalization.