语言

AssetPathAttribute 类

定义

指示组件参数接受 Razor 编译器可以扩展的静态资产路径。

[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public sealed class AssetPathAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type AssetPathAttribute = class
    inherit Attribute
Public NotInheritable Class AssetPathAttribute
Inherits Attribute
继承
AssetPathAttribute
特性

示例

[Parameter]
[AssetPath]
public string? Source { get; set; }

注解

此属性仅在标记的属性 ParameterAttribute上有效。

构造函数

名称 说明
AssetPathAttribute()

指示组件参数接受 Razor 编译器可以扩展的静态资产路径。

适用于