Method AddDisCatSharpAspNetCore
- Namespace
- DisCatSharp.Hosting.AspNetCore
- Assembly
- DisCatSharp.Hosting.AspNetCore.dll
AddDisCatSharpAspNetCore(IHostApplicationBuilder, Action<DiscordWebIngressOptions>?, Action<DiscordAspNetCoreIngressOptions>?, Action<DiscordOAuthIngressOptions>?)
Registers the DisCatSharp ASP.NET Core ingress services on a host application builder.
public static IHostApplicationBuilder AddDisCatSharpAspNetCore(this IHostApplicationBuilder builder, Action<DiscordWebIngressOptions>? configure = null, Action<DiscordAspNetCoreIngressOptions>? configureAspNetCore = null, Action<DiscordOAuthIngressOptions>? configureOAuth = null)
Parameters
builderIHostApplicationBuilderThe host application builder to update.
configureAction<DiscordWebIngressOptions>Optional configuration callback for the ingress subsystem.
configureAspNetCoreAction<DiscordAspNetCoreIngressOptions>Optional configuration callback for ASP.NET Core endpoint conventions.
configureOAuthAction<DiscordOAuthIngressOptions>Optional configuration callback for the OAuth callback flow.
Returns
- IHostApplicationBuilder
The
builderfor chaining purposes.
Remarks
This is a convenience wrapper over AddDisCatSharpAspNetCore(IServiceCollection, Action<DiscordWebIngressOptions>?, Action<DiscordAspNetCoreIngressOptions>?, Action<DiscordOAuthIngressOptions>?) for applications that configure services through IHostApplicationBuilder.
Exceptions
- ArgumentNullException
builderis null.
AddDisCatSharpAspNetCore(IHostBuilder, Action<DiscordWebIngressOptions>?, Action<DiscordAspNetCoreIngressOptions>?, Action<DiscordOAuthIngressOptions>?)
Registers the DisCatSharp ASP.NET Core ingress services on a host builder.
public static IHostBuilder AddDisCatSharpAspNetCore(this IHostBuilder builder, Action<DiscordWebIngressOptions>? configure = null, Action<DiscordAspNetCoreIngressOptions>? configureAspNetCore = null, Action<DiscordOAuthIngressOptions>? configureOAuth = null)
Parameters
builderIHostBuilderThe host builder to update.
configureAction<DiscordWebIngressOptions>Optional configuration callback for the ingress subsystem.
configureAspNetCoreAction<DiscordAspNetCoreIngressOptions>Optional configuration callback for ASP.NET Core endpoint conventions.
configureOAuthAction<DiscordOAuthIngressOptions>Optional configuration callback for the OAuth callback flow.
Returns
- IHostBuilder
The
builderfor chaining purposes.
Remarks
This is the IHostBuilder counterpart to AddDisCatSharpAspNetCore(IHostApplicationBuilder, Action<DiscordWebIngressOptions>?, Action<DiscordAspNetCoreIngressOptions>?, Action<DiscordOAuthIngressOptions>?).
Exceptions
- ArgumentNullException
builderis null.