AcceptsAssetPathAttribute 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
声明接受静态资产路径扩展的 HTML 元素和属性组合。
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed class AcceptsAssetPathAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)>]
type AcceptsAssetPathAttribute = class
inherit Attribute
Public NotInheritable Class AcceptsAssetPathAttribute
Inherits Attribute
- 继承
-
AcceptsAssetPathAttribute
- 特性
示例
[AcceptsAssetPath("img", "src")]
public static class AssetPathAttributes
{
}
注解
Razor 编译器在命名 AssetPathAttributes的公共类上发现此元数据。
构造函数
| 名称 | 说明 |
|---|---|
| AcceptsAssetPathAttribute(String, String) |
初始化新实例 。AcceptsAssetPathAttribute |
属性
| 名称 | 说明 |
|---|---|
| AttributeName |
获取 HTML 属性名称。 |
| ElementName |
获取 HTML 元素名称。 |