EventBuilder 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
定義一個職業的事件。
public ref class EventBuilder abstract
public ref class EventBuilder sealed
public ref class EventBuilder sealed : System::Runtime::InteropServices::_EventBuilder
public abstract class EventBuilder
public sealed 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 MustInherit Class EventBuilder
Public NotInheritable Class EventBuilder
Public NotInheritable Class EventBuilder
Implements _EventBuilder
- 繼承
-
EventBuilder
- 屬性
- 實作
備註
An EventBuilder 總是與 TypeBuilder相關聯。 TypeBuilder.DefineEvent 方法會將新 EventBuilder 物件回傳給用戶端。
建構函式
| 名稱 | Description |
|---|---|
| EventBuilder() |
初始化 EventBuilder 類別的新執行個體。 |
方法
| 名稱 | Description |
|---|---|
| AddOtherMethod(MethodBuilder) |
新增了與此事件相關的「其他」方法之一。 「其他」方法是指與事件相關的「開啟」與「提升」方法以外的方法。 這個函式可以多次呼叫,以加入盡可能多的「其他」方法。 |
| AddOtherMethodCore(MethodBuilder) |
當在衍生類別中覆寫時,會加入與此事件相關的「其他」方法之一。 |
| Equals(Object) |
判斷指定的物件是否等於目前的物件。 (繼承來源 Object) |
| GetEventToken() |
此事件還原代幣。 |
| 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) |
明確介面實作
| 名稱 | Description |
|---|---|
| _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) |
提供物件所公開屬性和方法的存取權。 |