EventBuilder 类 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
定义类的事件。
public ref class EventBuilder abstractpublic ref class EventBuilder sealedpublic ref class EventBuilder sealed : System::Runtime::InteropServices::_EventBuilderpublic abstract class EventBuilderpublic 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._EventBuildertype 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 _EventBuilderPublic MustInherit Class EventBuilderPublic NotInheritable Class EventBuilderPublic NotInheritable Class EventBuilder
Implements _EventBuilder- 继承
- 
				EventBuilder
- 属性
- 实现
注解
始终 EventBuilder 与 TypeBuilder关联。 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) | 提供对某一对象公开的属性和方法的访问。 |