EventBuilder 類別

定義

定義類別的事件。

public ref class EventBuilder sealed
public ref class EventBuilder abstract
public ref class EventBuilder sealed : System::Runtime::InteropServices::_EventBuilder
public sealed class EventBuilder
public abstract class EventBuilder
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
public sealed class EventBuilder : System.Runtime.InteropServices._EventBuilder
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class EventBuilder : System.Runtime.InteropServices._EventBuilder
type EventBuilder = class
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
type EventBuilder = class
    interface _EventBuilder
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type EventBuilder = class
    interface _EventBuilder
Public NotInheritable Class EventBuilder
Public MustInherit Class EventBuilder
Public NotInheritable Class EventBuilder
Implements _EventBuilder
繼承
EventBuilder
屬性
實作

備註

EventBuilder 律與 相關聯 TypeBuilder 。 TypeBuilder.DefineEvent 方法會將新的 EventBuilder 傳回給用戶端。

建構函式

EventBuilder()

初始化 EventBuilder 類別的新執行個體。

方法

AddOtherMethod(MethodBuilder)

加入一個與這個事件相關聯的「其他」方法。 「其他」方法是指除了「on」和「raise」方法之外,與這個事件關聯的方法。 您可呼叫這個函式許多次,視需要加入許多「其他」方法。

AddOtherMethodCore(MethodBuilder)

在衍生類別中覆寫時,新增與此事件相關聯的其中一個「其他」方法。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetEventToken()

傳回這個事件的語彙基元 (Token)。

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
SetAddOnMethod(MethodBuilder)

設定用來訂閱這個事件的方法。

SetAddOnMethodCore(MethodBuilder)

在衍生類別中覆寫時,設定用來訂閱此事件的方法。

SetCustomAttribute(ConstructorInfo, Byte[])

使用指定的自訂屬性 Blob 來設定自訂屬性。

SetCustomAttribute(CustomAttributeBuilder)

使用自訂屬性產生器來設定自訂屬性。

SetCustomAttributeCore(ConstructorInfo, ReadOnlySpan<Byte>)

在衍生類別中覆寫時,在此元件上設定自訂屬性。

SetRaiseMethod(MethodBuilder)

設定用來引發這個事件的方法。

SetRaiseMethodCore(MethodBuilder)

在衍生類別中覆寫時,設定用來引發此事件的方法。

SetRemoveOnMethod(MethodBuilder)

設定用來取消訂閱這個事件的方法。

SetRemoveOnMethodCore(MethodBuilder)

在衍生類別中覆寫時,設定用來取消訂閱此事件的方法。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

明確介面實作

_EventBuilder.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

將一組名稱對應至一組對應的分派識別項 (Dispatch Identifier)。

_EventBuilder.GetTypeInfo(UInt32, UInt32, IntPtr)

擷取物件的類型資訊,可以用來取得介面的類型資訊。

_EventBuilder.GetTypeInfoCount(UInt32)

擷取物件提供的類型資訊介面數目 (0 或 1)。

_EventBuilder.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

提供物件所公開的屬性和方法的存取權。

適用於