AssetPathAttribute 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指示组件参数接受 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 编译器可以扩展的静态资产路径。 |