JSExportAttribute 類別
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示來源產生器應該將屬性化方法導出至 JavaScript,並建立封送處理其自變數和任何傳回值或擲回例外狀況所需的 Thunks。
public ref class JSExportAttribute sealed : Attribute
C#
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
[System.Runtime.Versioning.SupportedOSPlatform("browser")]
public sealed class JSExportAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)>]
[<System.Runtime.Versioning.SupportedOSPlatform("browser")>]
type JSExportAttribute = class
inherit Attribute
Public NotInheritable Class JSExportAttribute
Inherits Attribute
- 繼承
- 屬性
用於封送處理複雜型別 JSMarshalAsAttribute<T>的自變數。
如果未啟用與此屬性相關聯的來源產生器,這個屬性就無意義。
目前的內建來源產生器僅支援 C#,並且只在套用至靜態、非部分或非泛型方法時提供實作。
鏈接器無法修剪匯出的方法。
JSExport |
初始化 JSExportAttribute 類別的新執行個體。 |
Equals(Object) |
傳回值,這個值指出此執行個體是否與指定的物件相等。 (繼承來源 Attribute) |
Get |
傳回這個執行個體的雜湊碼。 (繼承來源 Attribute) |
Get |
取得目前執行個體的 Type。 (繼承來源 Object) |
Is |
在衍生類別中覆寫時,表示這個執行個體的值是衍生類別的預設值。 (繼承來源 Attribute) |
Match(Object) |
在衍生類別中覆寫時,會傳回值,表示這個執行個體是否等於指定物件。 (繼承來源 Attribute) |
Memberwise |
建立目前 Object 的淺層複製。 (繼承來源 Object) |
To |
傳回代表目前物件的字串。 (繼承來源 Object) |
產品 | 版本 |
---|---|
.NET | 7, 8, 9 |