다음을 통해 공유


WebHostBuilderExtensions.UseStartup 메서드

정의

오버로드

UseStartup(IWebHostBuilder, Type)

웹 호스트에서 사용할 시작 유형을 지정합니다.

UseStartup<TStartup>(IWebHostBuilder)

웹 호스트에서 사용할 시작 유형을 지정합니다.

UseStartup<TStartup>(IWebHostBuilder, Func<WebHostBuilderContext,TStartup>)

웹 호스트에서 사용할 시작 instance 만드는 팩터리를 지정합니다.

UseStartup(IWebHostBuilder, Type)

Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs

웹 호스트에서 사용할 시작 유형을 지정합니다.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseStartup(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Type ^ startupType);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseStartup (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Type startupType);
static member UseStartup : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Type -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseStartup (hostBuilder As IWebHostBuilder, startupType As Type) As IWebHostBuilder

매개 변수

hostBuilder
IWebHostBuilder

구성할 IWebHostBuilder입니다.

startupType
Type

사용할 Type입니다.

반환

IWebHostBuilder

적용 대상

UseStartup<TStartup>(IWebHostBuilder)

Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs

웹 호스트에서 사용할 시작 유형을 지정합니다.

public:
generic <typename TStartup>
 where TStartup : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseStartup(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseStartup<TStartup> (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder) where TStartup : class;
static member UseStartup : Microsoft.AspNetCore.Hosting.IWebHostBuilder -> Microsoft.AspNetCore.Hosting.IWebHostBuilder (requires 'Startup : null)
<Extension()>
Public Function UseStartup(Of TStartup As Class) (hostBuilder As IWebHostBuilder) As IWebHostBuilder

형식 매개 변수

TStartup

애플리케이션의 시작 메서드를 포함하는 형식입니다.

매개 변수

hostBuilder
IWebHostBuilder

구성할 IWebHostBuilder입니다.

반환

IWebHostBuilder

적용 대상

UseStartup<TStartup>(IWebHostBuilder, Func<WebHostBuilderContext,TStartup>)

Source:
WebHostBuilderExtensions.cs

웹 호스트에서 사용할 시작 instance 만드는 팩터리를 지정합니다.

public:
generic <typename TStartup>
 where TStartup : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseStartup(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Func<Microsoft::AspNetCore::Hosting::WebHostBuilderContext ^, TStartup> ^ startupFactory);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseStartup<TStartup> (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Func<Microsoft.AspNetCore.Hosting.WebHostBuilderContext,TStartup> startupFactory) where TStartup : class;
static member UseStartup : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Func<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, 'Startup (requires 'Startup : null)> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder (requires 'Startup : null)
<Extension()>
Public Function UseStartup(Of TStartup As Class) (hostBuilder As IWebHostBuilder, startupFactory As Func(Of WebHostBuilderContext, TStartup)) As IWebHostBuilder

형식 매개 변수

TStartup

매개 변수

hostBuilder
IWebHostBuilder

구성할 IWebHostBuilder입니다.

startupFactory
Func<WebHostBuilderContext,TStartup>

시작 클래스에 대한 팩터리를 지정하는 대리자입니다.

반환

IWebHostBuilder

설명

트리밍된 앱에서 의 TStartup 모든 공용 메서드가 유지됩니다. 이는 기본 형식이 아닌 시작 형식과 직접 일치해야 합니다.

적용 대상