EventBuilder EventBuilder EventBuilder EventBuilder Class

定义

定义类的事件。Defines events for a class.

public ref class EventBuilder sealed : 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
    interface _EventBuilder
Public NotInheritable Class EventBuilder
Implements _EventBuilder
继承
EventBuilderEventBuilderEventBuilderEventBuilder
属性
实现

注解

EventBuilder始终与TypeBuilderAn EventBuilder is always associated with a TypeBuilder. TypeBuilder.DefineEvent 方法将返回一个新EventBuilder到客户端。The TypeBuilder.DefineEvent method will return a new EventBuilder to a client.

构造函数

EventBuilder() EventBuilder() EventBuilder() EventBuilder()

方法

AddOtherMethod(MethodBuilder) AddOtherMethod(MethodBuilder) AddOtherMethod(MethodBuilder) AddOtherMethod(MethodBuilder)

添加与该事件关联的“其他”方法之一。Adds one of the "other" methods associated with this event. “其他”方法是与该事件关联的、除了“开”(on) 和“引发”(raise) 方法以外的方法。"Other" methods are methods other than the "on" and "raise" methods associated with an event. 可以多次调用此函数,以添加一样多的“其他”方法。This function can be called many times to add as many "other" methods.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEventToken() GetEventToken() GetEventToken() GetEventToken()

返回该事件的标记。Returns the token for this event.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
SetAddOnMethod(MethodBuilder) SetAddOnMethod(MethodBuilder) SetAddOnMethod(MethodBuilder) SetAddOnMethod(MethodBuilder)

设置用于预订该事件的方法。Sets the method used to subscribe to this event.

SetCustomAttribute(ConstructorInfo, Byte[]) SetCustomAttribute(ConstructorInfo, Byte[]) SetCustomAttribute(ConstructorInfo, Byte[]) SetCustomAttribute(ConstructorInfo, Byte[])

使用指定的自定义属性 Blob 设置自定义属性。Set a custom attribute using a specified custom attribute blob.

SetCustomAttribute(CustomAttributeBuilder) SetCustomAttribute(CustomAttributeBuilder) SetCustomAttribute(CustomAttributeBuilder) SetCustomAttribute(CustomAttributeBuilder)

使用自定义属性生成器设置自定义属性。Sets a custom attribute using a custom attribute builder.

SetRaiseMethod(MethodBuilder) SetRaiseMethod(MethodBuilder) SetRaiseMethod(MethodBuilder) SetRaiseMethod(MethodBuilder)

设置用于引发该事件的方法。Sets the method used to raise this event.

SetRemoveOnMethod(MethodBuilder) SetRemoveOnMethod(MethodBuilder) SetRemoveOnMethod(MethodBuilder) SetRemoveOnMethod(MethodBuilder)

设置用于取消预订该事件的方法。Sets the method used to unsubscribe to this event.

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

显式界面实现

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

将一组名称映射为对应的一组调度标识符。Maps a set of names to a corresponding set of dispatch identifiers.

_EventBuilder.GetTypeInfo(UInt32, UInt32, IntPtr) _EventBuilder.GetTypeInfo(UInt32, UInt32, IntPtr) _EventBuilder.GetTypeInfo(UInt32, UInt32, IntPtr) _EventBuilder.GetTypeInfo(UInt32, UInt32, IntPtr)

检索对象的类型信息,然后可以使用该信息获取接口的类型信息。Retrieves the type information for an object, which can then be used to get the type information for an interface.

_EventBuilder.GetTypeInfoCount(UInt32) _EventBuilder.GetTypeInfoCount(UInt32) _EventBuilder.GetTypeInfoCount(UInt32) _EventBuilder.GetTypeInfoCount(UInt32)

检索对象提供的类型信息接口的数量(0 或 1)。Retrieves the number of type information interfaces that an object provides (either 0 or 1).

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

提供对某一对象公开的属性和方法的访问。Provides access to properties and methods exposed by an object.

适用于