ISupportsStartup.UseStartup Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
UseStartup(Type) |
Specify the startup type to be used by the web host. |
UseStartup<TStartup>(Func<WebHostBuilderContext,TStartup>) |
Specify a factory that creates the startup instance to be used by the web host. |
UseStartup(Type)
- Source:
- ISupportsStartup.cs
Specify the startup type to be used by the web host.
public Microsoft.AspNetCore.Hosting.IWebHostBuilder UseStartup (Type startupType);
abstract member UseStartup : Type -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
Public Function UseStartup (startupType As Type) As IWebHostBuilder
Parameters
Returns
The IWebHostBuilder.
Applies to
UseStartup<TStartup>(Func<WebHostBuilderContext,TStartup>)
- Source:
- ISupportsStartup.cs
Specify a factory that creates the startup instance to be used by the web host.
public Microsoft.AspNetCore.Hosting.IWebHostBuilder UseStartup<TStartup> (Func<Microsoft.AspNetCore.Hosting.WebHostBuilderContext,TStartup> startupFactory);
abstract member UseStartup : Func<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, 'Startup> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
Public Function UseStartup(Of TStartup) (startupFactory As Func(Of WebHostBuilderContext, TStartup)) As IWebHostBuilder
Type Parameters
- TStartup
Parameters
- startupFactory
- Func<WebHostBuilderContext,TStartup>
A delegate that specifies a factory for the startup class.
Returns
The IWebHostBuilder.
Remarks
When in a trimmed app, all public methods of TStartup
are preserved. This should match the Startup type directly (and not a base type).