共用方式為


RazorComponentsEndpointConventionBuilderExtensions.WithStaticAssets 方法

定義

設定元件應用程式的 ResourceAssetCollectionImportMapDefinition 元數據。

public static Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder WithStaticAssets (this Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder builder, string? manifestPath = default);
static member WithStaticAssets : Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder * string -> Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder
<Extension()>
Public Function WithStaticAssets (builder As RazorComponentsEndpointConventionBuilder, Optional manifestPath As String = Nothing) As RazorComponentsEndpointConventionBuilder

參數

manifestPath
String

與資產相關聯的指令清單。

傳回

RazorComponentsEndpointConventionBuilder

備註

manifestPath 必須符合提供給 MapStaticAssets(IEndpointRouteBuilder, String) 呼叫之管理檔案的路徑。

適用於