Method AddDisCatSharpAspNetCoreSelfHost
- Namespace
- DisCatSharp.Hosting.AspNetCore
- Assembly
- DisCatSharp.Hosting.AspNetCore.dll
AddDisCatSharpAspNetCoreSelfHost(IHostApplicationBuilder, Action<DiscordAspNetCoreSelfHostOptions>?, Action<DiscordWebIngressOptions>?, Action<DiscordAspNetCoreIngressOptions>?)
Registers the optional self-hosted DisCatSharp ASP.NET Core ingress services on a host application builder.
public static IHostApplicationBuilder AddDisCatSharpAspNetCoreSelfHost(this IHostApplicationBuilder builder, Action<DiscordAspNetCoreSelfHostOptions>? configureSelfHost = null, Action<DiscordWebIngressOptions>? configure = null, Action<DiscordAspNetCoreIngressOptions>? configureAspNetCore = null)
Parameters
builderIHostApplicationBuilderThe host application builder to update.
configureSelfHostAction<DiscordAspNetCoreSelfHostOptions>Optional configuration callback for the internal ASP.NET Core host.
configureAction<DiscordWebIngressOptions>Optional configuration callback for the ingress subsystem.
configureAspNetCoreAction<DiscordAspNetCoreIngressOptions>Optional configuration callback for ASP.NET Core endpoint conventions.
Returns
- IHostApplicationBuilder
The
builderfor chaining purposes.
Remarks
This wraps AddDisCatSharpAspNetCoreSelfHost(IServiceCollection, Action<DiscordAspNetCoreSelfHostOptions>?, Action<DiscordWebIngressOptions>?, Action<DiscordAspNetCoreIngressOptions>?) and is intended for worker-style hosts that do not already manage an ASP.NET Core application.
Exceptions
- ArgumentNullException
builderis null.
AddDisCatSharpAspNetCoreSelfHost(IHostBuilder, Action<DiscordAspNetCoreSelfHostOptions>?, Action<DiscordWebIngressOptions>?, Action<DiscordAspNetCoreIngressOptions>?)
Registers the optional self-hosted DisCatSharp ASP.NET Core ingress services on a host builder.
public static IHostBuilder AddDisCatSharpAspNetCoreSelfHost(this IHostBuilder builder, Action<DiscordAspNetCoreSelfHostOptions>? configureSelfHost = null, Action<DiscordWebIngressOptions>? configure = null, Action<DiscordAspNetCoreIngressOptions>? configureAspNetCore = null)
Parameters
builderIHostBuilderThe host builder to update.
configureSelfHostAction<DiscordAspNetCoreSelfHostOptions>Optional configuration callback for the internal ASP.NET Core host.
configureAction<DiscordWebIngressOptions>Optional configuration callback for the ingress subsystem.
configureAspNetCoreAction<DiscordAspNetCoreIngressOptions>Optional configuration callback for ASP.NET Core endpoint conventions.
Returns
- IHostBuilder
The
builderfor chaining purposes.
Remarks
This is the IHostBuilder counterpart to AddDisCatSharpAspNetCoreSelfHost(IHostApplicationBuilder, Action<DiscordAspNetCoreSelfHostOptions>?, Action<DiscordWebIngressOptions>?, Action<DiscordAspNetCoreIngressOptions>?).
Exceptions
- ArgumentNullException
builderis null.