Class EventBuildInfo
Contains information about event definitions in types built at runtime.
Inherited Members
Namespace: TheXDS.MCART.Types
Assembly: MCART.TypeFactory.dll
Syntax
public class EventBuildInfo
Properties
| Edit this page View SourceAddMethod
Gets a reference to the method used to subscribe an event handler to the event represented by this instance.
Declaration
public MethodBuilder AddMethod { get; }
Property Value
| Type | Description |
|---|---|
| MethodBuilder |
Remarks
The delegate represented by this property will be compatible with the Action<T> signature where the type argument will be EventArgs or a type derived from it.
HandlerField
Gets a reference to the field used to hold the active event handler that is invoked when the event occurs.
Declaration
public FieldBuilder HandlerField { get; }
Property Value
| Type | Description |
|---|---|
| FieldBuilder |
Name
The name defined for the event represented by this instance.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
RaiseMethod
Gets a reference to the method used to raise the event represented by this instance.
Declaration
public MethodBuilder RaiseMethod { get; }
Property Value
| Type | Description |
|---|---|
| MethodBuilder |
Remarks
The delegate represented by this property will be compatible with the Action<T1, T2> signature where the first type argument will be a specific type or object, and the second will be EventArgs or a type derived from it.
RemoveMethod
Gets a reference to the method used to unsubscribe an event handler from the event represented by this instance.
Declaration
public MethodBuilder RemoveMethod { get; }
Property Value
| Type | Description |
|---|---|
| MethodBuilder |
Remarks
The delegate represented by this property will be compatible with the Action<T> signature where the type argument will be EventArgs or a type derived from it.
Methods
| Edit this page View SourceCreate<TEventHandler, TSender, TEventArgs>(TypeBuilder, string)
Creates a new event on the specified TypeBuilder, adding the required accessor methods.
Declaration
public static EventBuildInfo Create<TEventHandler, TSender, TEventArgs>(TypeBuilder builder, string name) where TEventHandler : Delegate where TEventArgs : EventArgs
Parameters
| Type | Name | Description |
|---|---|---|
| TypeBuilder | builder | The TypeBuilder on which the event and its required accessor methods will be defined. |
| string | name | The name of the new event. |
Returns
| Type | Description |
|---|---|
| EventBuildInfo | An EventBuildInfo containing information about the event that has been defined. |
Type Parameters
| Name | Description |
|---|---|
| TEventHandler | The event handler delegate. It must follow the standard
event handler signature, i.e. a void method with a
|
| TSender | The type of the object that raises the event. Can be object. |
| TEventArgs | The event argument type passed when the event occurs. |