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