共用方式為


WebHostBuilderQuicExtensions.UseQuic 方法

定義

多載

UseQuic(IWebHostBuilder)

將 Quic 指定為 Kestrel 要使用的傳輸。

UseQuic(IWebHostBuilder, Action<QuicTransportOptions>)

將 Quic 指定為 Kestrel 要使用的傳輸。

UseQuic(IWebHostBuilder)

來源:
WebHostBuilderQuicExtensions.cs

注意

您必須在專案檔中將 EnablePreviewFeatures 屬性設定為 True,並啟用專案中的預覽功能,才能使用此預覽 API。 如需詳細資訊,請參閱 https://aka.ms/dotnet-preview-features

將 Quic 指定為 Kestrel 要使用的傳輸。

public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseQuic (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder);
static member UseQuic : Microsoft.AspNetCore.Hosting.IWebHostBuilder -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseQuic (hostBuilder As IWebHostBuilder) As IWebHostBuilder

參數

hostBuilder
IWebHostBuilder

要設定的 IWebHostBuilder

傳回

IWebHostBuilder

適用於

UseQuic(IWebHostBuilder, Action<QuicTransportOptions>)

來源:
WebHostBuilderQuicExtensions.cs

注意

您必須在專案檔中將 EnablePreviewFeatures 屬性設定為 True,並啟用專案中的預覽功能,才能使用此預覽 API。 如需詳細資訊,請參閱 https://aka.ms/dotnet-preview-features

將 Quic 指定為 Kestrel 要使用的傳輸。

public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseQuic (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.QuicTransportOptions> configureOptions);
static member UseQuic : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.QuicTransportOptions> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseQuic (hostBuilder As IWebHostBuilder, configureOptions As Action(Of QuicTransportOptions)) As IWebHostBuilder

參數

hostBuilder
IWebHostBuilder

要設定的 IWebHostBuilder

configureOptions
Action<QuicTransportOptions>

設定傳輸選項的回呼。

傳回

IWebHostBuilder

適用於