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
属性
实现

注解

始终 EventBuilderTypeBuilder相关联。 TypeBuilder.DefineEvent 方法将向客户端返回新的 EventBuilder

构造函数

EventBuilder()

初始化 EventBuilder 类的新实例。

方法

AddOtherMethod(MethodBuilder)

添加与该事件关联的“其他”方法之一。 “其他”方法是与该事件关联的、除了“开”(on) 和“引发”(raise) 方法以外的方法。 可以多次调用此函数,以添加一样多的“其他”方法。

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)

显式接口实现

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

将一组名称映射为对应的一组调度标识符。

_EventBuilder.GetTypeInfo(UInt32, UInt32, IntPtr)

检索对象的类型信息,然后可以使用该信息获取接口的类型信息。

_EventBuilder.GetTypeInfoCount(UInt32)

检索对象提供的类型信息接口的数量(0 或 1)。

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

提供对某一对象公开的属性和方法的访问。

适用于