Show / Hide Table of Contents

Class EventBuildInfo

Contains information about event definitions in types built at runtime.

Inheritance
object
EventBuildInfo
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TheXDS.MCART.Types
Assembly: MCART.TypeFactory.dll
Syntax
public class EventBuildInfo

Properties

| Edit this page View Source

AddMethod

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.

| Edit this page View Source

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
| Edit this page View Source

Name

The name defined for the event represented by this instance.

Declaration
public string Name { get; }
Property Value
Type Description
string
| Edit this page View Source

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.

| Edit this page View Source

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 Source

Create<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 argument (commonly object) and a TEventArgs argument.

TSender

The type of the object that raises the event. Can be object.

TEventArgs

The event argument type passed when the event occurs.

Extension Methods

Objects.ShallowCopyTo(object, object, Type)
ObjectExtensions.FieldsOf<T>(object)
ObjectExtensions.GetAttribute<T>(object)
ObjectExtensions.GetAttributes<T>(object)
ObjectExtensions.HasAttrValue<TAttribute, TValue>(object, out TValue)
ObjectExtensions.HasAttribute<T>(object)
ObjectExtensions.HasAttribute<T>(object, out T?)
ObjectExtensions.HasAttributes<T>(object, out IEnumerable<T>?)
ObjectExtensions.Is(object?, object?)
ObjectExtensions.IsEither(object, IEnumerable)
ObjectExtensions.IsEither(object, params object[])
ObjectExtensions.IsNeither(object, IEnumerable)
ObjectExtensions.IsNeither(object, params object[])
ObjectExtensions.IsNot(object?, object?)
ObjectExtensions.PropertiesOf<T>(object)
ObjectExtensions.WhichAre(object, IEnumerable<object>)
ObjectExtensions.WhichAre(object, params object[])
Common.IfNotNull<T>(T?, Action<T>)
Objects.Itself<T>(T)
Objects.ShallowCopyTo<T>(T, T)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX