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) 调用的管理文件的路径匹配。

适用于