Language

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という名前のパブリック クラスでこのメタデータを検出します。

コンストラクター

Name 説明
AcceptsAssetPathAttribute(String, String)

AcceptsAssetPathAttributeの新しいインスタンスを初期化します。

プロパティ

Name 説明
AttributeName

HTML 属性名を取得します。

ElementName

HTML 要素名を取得します。

適用対象