語言

AssetPathAttribute 類別

定義

表示元件參數接受 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的屬性。

建構函式

名稱 Description
AssetPathAttribute()

表示元件參數接受 Razor 編譯器可擴充的靜態資產路徑。

適用於