IHostFactoryExtensions
NexusLabs.Needlr.Hosting¶
IHostFactoryExtensions Class¶
Extension methods for IHostFactory.
Inheritance System.Object 🡒 IHostFactoryExtensions
Methods¶
IHostFactoryExtensions.Create(this IHostFactory, CreateHostOptions) Method¶
Creates an Microsoft.Extensions.Hosting.IHost using the specified options.
public static Microsoft.Extensions.Hosting.IHost Create(this NexusLabs.Needlr.Hosting.IHostFactory factory, NexusLabs.Needlr.Hosting.CreateHostOptions options);
Parameters¶
factory IHostFactory
The host factory.
options CreateHostOptions
The options for creating the host.
Returns¶
Microsoft.Extensions.Hosting.IHost
The configured Microsoft.Extensions.Hosting.IHost.
Exceptions¶
System.ArgumentNullException
Thrown when factory or options is null.
IHostFactoryExtensions.Create(this IHostFactory, CreateHostOptions, Action<HostApplicationBuilder,CreateHostOptions>) Method¶
Creates an Microsoft.Extensions.Hosting.IHost using the specified options and configuration callback.
public static Microsoft.Extensions.Hosting.IHost Create(this NexusLabs.Needlr.Hosting.IHostFactory factory, NexusLabs.Needlr.Hosting.CreateHostOptions options, System.Action<Microsoft.Extensions.Hosting.HostApplicationBuilder,NexusLabs.Needlr.Hosting.CreateHostOptions>? configureCallback);
Parameters¶
factory IHostFactory
The host factory.
options CreateHostOptions
The options for creating the host.
configureCallback System.Action<Microsoft.Extensions.Hosting.HostApplicationBuilder,CreateHostOptions>
Optional callback to configure the Microsoft.Extensions.Hosting.HostApplicationBuilder.
Returns¶
Microsoft.Extensions.Hosting.IHost
The configured Microsoft.Extensions.Hosting.IHost.
Exceptions¶
System.ArgumentNullException
Thrown when factory or options is null.