EventBuilder Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines events for a class.
public ref class EventBuilder abstract
public ref class EventBuilder sealed
public abstract class EventBuilder
public sealed class EventBuilder
type EventBuilder = class
Public MustInherit Class EventBuilder
Public NotInheritable Class EventBuilder
- Inheritance
-
EventBuilder
Remarks
An EventBuilder is always associated with a TypeBuilder. The TypeBuilder.DefineEvent method will return a new EventBuilder to a client.
Constructors
| Name | Description |
|---|---|
| EventBuilder() |
Initializes a new instance of the EventBuilder class. |
Methods
| Name | Description |
|---|---|
| AddOtherMethod(MethodBuilder) |
Adds one of the "other" methods associated with this event. "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. |
| AddOtherMethodCore(MethodBuilder) |
When overridden in a derived class, adds one of the "other" methods associated with this event. |
| Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
| GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
| GetType() |
Gets the Type of the current instance. (Inherited from Object) |
| MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
| SetAddOnMethod(MethodBuilder) |
Sets the method used to subscribe to this event. |
| SetAddOnMethodCore(MethodBuilder) |
When overridden in a derived class, sets the method used to subscribe to this event. |
| SetCustomAttribute(ConstructorInfo, Byte[]) |
Set a custom attribute using a specified custom attribute blob. |
| SetCustomAttribute(CustomAttributeBuilder) |
Sets a custom attribute using a custom attribute builder. |
| SetCustomAttributeCore(ConstructorInfo, ReadOnlySpan<Byte>) |
When overridden in a derived class, sets a custom attribute on this assembly. |
| SetRaiseMethod(MethodBuilder) |
Sets the method used to raise this event. |
| SetRaiseMethodCore(MethodBuilder) |
When overridden in a derived class, sets the method used to raise this event. |
| SetRemoveOnMethod(MethodBuilder) |
Sets the method used to unsubscribe to this event. |
| SetRemoveOnMethodCore(MethodBuilder) |
When overridden in a derived class, sets the method used to unsubscribe to this event. |
| ToString() |
Returns a string that represents the current object. (Inherited from Object) |