语言

AcceptsAssetPathAttribute 类

定义

声明接受静态资产路径扩展的 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 元素名称。

适用于