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資料。
建構函式
| 名稱 | Description |
|---|---|
| AcceptsAssetPathAttribute(String, String) |
初始化一個新的 實 AcceptsAssetPathAttribute例。 |
屬性
| 名稱 | Description |
|---|---|
| AttributeName |
取得 HTML 屬性名稱。 |
| ElementName |
取得 HTML 元素名稱。 |