CreateWebApplicationOptionsExtensions
NexusLabs.Needlr.AspNet¶
CreateWebApplicationOptionsExtensions Class¶
Provides extension methods for configuring CreateWebApplicationOptions.
Inheritance System.Object 🡒 CreateWebApplicationOptionsExtensions
Methods¶
CreateWebApplicationOptionsExtensions.UsingApplicationName(this CreateWebApplicationOptions, string) Method¶
Configures the options to use the specified application name.
public static NexusLabs.Needlr.AspNet.CreateWebApplicationOptions UsingApplicationName(this NexusLabs.Needlr.AspNet.CreateWebApplicationOptions options, string applicationName);
Parameters¶
options CreateWebApplicationOptions
The options to configure.
applicationName System.String
The application name to use.
Returns¶
CreateWebApplicationOptions
A new instance of CreateWebApplicationOptions with the application name configured.
Exceptions¶
System.ArgumentNullException
Thrown when options or applicationName is null.
CreateWebApplicationOptionsExtensions.UsingCliArgs(this CreateWebApplicationOptions, string[]) Method¶
Configures the options to use the specified command line arguments.
public static NexusLabs.Needlr.AspNet.CreateWebApplicationOptions UsingCliArgs(this NexusLabs.Needlr.AspNet.CreateWebApplicationOptions options, string[] args);
Parameters¶
options CreateWebApplicationOptions
The options to configure.
args System.String[]
The command line arguments to use.
Returns¶
CreateWebApplicationOptions
A new instance of CreateWebApplicationOptions with the command line arguments configured.
Exceptions¶
System.ArgumentNullException
Thrown when options or args is null.
CreateWebApplicationOptionsExtensions.UsingPostPluginRegistrationCallback(this CreateWebApplicationOptions, Action<IServiceCollection>) Method¶
Adds a post-plugin registration callback to the options.
public static NexusLabs.Needlr.AspNet.CreateWebApplicationOptions UsingPostPluginRegistrationCallback(this NexusLabs.Needlr.AspNet.CreateWebApplicationOptions options, System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> callback);
Parameters¶
options CreateWebApplicationOptions
The options to configure.
callback System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection>
The callback to add for post-plugin registration.
Returns¶
CreateWebApplicationOptions
A new instance of CreateWebApplicationOptions with the callback added.
Exceptions¶
System.ArgumentNullException
Thrown when options or callback is null.
CreateWebApplicationOptionsExtensions.UsingPostPluginRegistrationCallbacks(this CreateWebApplicationOptions, Action<IServiceCollection>[]) Method¶
Adds multiple post-plugin registration callbacks to the options.
public static NexusLabs.Needlr.AspNet.CreateWebApplicationOptions UsingPostPluginRegistrationCallbacks(this NexusLabs.Needlr.AspNet.CreateWebApplicationOptions options, params System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection>[] callbacks);
Parameters¶
options CreateWebApplicationOptions
The options to configure.
callbacks System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection>[]
The callbacks to add for post-plugin registration.
Returns¶
CreateWebApplicationOptions
A new instance of CreateWebApplicationOptions with the callbacks added.
Exceptions¶
System.ArgumentNullException
Thrown when options or callbacks is null.
CreateWebApplicationOptionsExtensions.UsingPostPluginRegistrationCallbacks(this CreateWebApplicationOptions, IEnumerable<Action<IServiceCollection>>) Method¶
Adds multiple post-plugin registration callbacks to the options.
public static NexusLabs.Needlr.AspNet.CreateWebApplicationOptions UsingPostPluginRegistrationCallbacks(this NexusLabs.Needlr.AspNet.CreateWebApplicationOptions options, System.Collections.Generic.IEnumerable<System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection>> callbacks);
Parameters¶
options CreateWebApplicationOptions
The options to configure.
callbacks System.Collections.Generic.IEnumerable<System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection>>
The callbacks to add for post-plugin registration.
Returns¶
CreateWebApplicationOptions
A new instance of CreateWebApplicationOptions with the callbacks added.
Exceptions¶
System.ArgumentNullException
Thrown when options or callbacks is null.
CreateWebApplicationOptionsExtensions.UsingPrePluginRegistrationCallback(this CreateWebApplicationOptions, Action<IServiceCollection>) Method¶
Adds a pre-plugin registration callback to the options.
public static NexusLabs.Needlr.AspNet.CreateWebApplicationOptions UsingPrePluginRegistrationCallback(this NexusLabs.Needlr.AspNet.CreateWebApplicationOptions options, System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> callback);
Parameters¶
options CreateWebApplicationOptions
The options to configure.
callback System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection>
The callback to add for pre-plugin registration.
Returns¶
CreateWebApplicationOptions
A new instance of CreateWebApplicationOptions with the callback added.
Exceptions¶
System.ArgumentNullException
Thrown when options or callback is null.
CreateWebApplicationOptionsExtensions.UsingPrePluginRegistrationCallbacks(this CreateWebApplicationOptions, Action<IServiceCollection>[]) Method¶
Adds multiple pre-plugin registration callbacks to the options.
public static NexusLabs.Needlr.AspNet.CreateWebApplicationOptions UsingPrePluginRegistrationCallbacks(this NexusLabs.Needlr.AspNet.CreateWebApplicationOptions options, params System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection>[] callbacks);
Parameters¶
options CreateWebApplicationOptions
The options to configure.
callbacks System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection>[]
The callbacks to add for pre-plugin registration.
Returns¶
CreateWebApplicationOptions
A new instance of CreateWebApplicationOptions with the callbacks added.
Exceptions¶
System.ArgumentNullException
Thrown when options or callbacks is null.
CreateWebApplicationOptionsExtensions.UsingPrePluginRegistrationCallbacks(this CreateWebApplicationOptions, IEnumerable<Action<IServiceCollection>>) Method¶
Adds multiple pre-plugin registration callbacks to the options.
public static NexusLabs.Needlr.AspNet.CreateWebApplicationOptions UsingPrePluginRegistrationCallbacks(this NexusLabs.Needlr.AspNet.CreateWebApplicationOptions options, System.Collections.Generic.IEnumerable<System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection>> callbacks);
Parameters¶
options CreateWebApplicationOptions
The options to configure.
callbacks System.Collections.Generic.IEnumerable<System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection>>
The callbacks to add for pre-plugin registration.
Returns¶
CreateWebApplicationOptions
A new instance of CreateWebApplicationOptions with the callbacks added.
Exceptions¶
System.ArgumentNullException
Thrown when options or callbacks is null.
CreateWebApplicationOptionsExtensions.UsingStartupConsoleLogger(this CreateWebApplicationOptions, string, LogLevel) Method¶
Configures the options to use a console logger for startup logging.
public static NexusLabs.Needlr.AspNet.CreateWebApplicationOptions UsingStartupConsoleLogger(this NexusLabs.Needlr.AspNet.CreateWebApplicationOptions options, string name="Startup", Microsoft.Extensions.Logging.LogLevel level=Microsoft.Extensions.Logging.LogLevel.Debug);
Parameters¶
options CreateWebApplicationOptions
The options to configure.
name System.String
The name of the logger. Defaults to "Startup".
level Microsoft.Extensions.Logging.LogLevel
The minimum log level. Defaults to Microsoft.Extensions.Logging.LogLevel.Debug.
Returns¶
CreateWebApplicationOptions
A new instance of CreateWebApplicationOptions with the console logger configured.
Exceptions¶
System.ArgumentNullException
Thrown when options is null.
System.ArgumentException
Thrown when name is null or whitespace.