Show / Hide Table of Contents

Class Event<T, THandler>

Provides typed access to instance event declared in type T.

Inheritance
Object
MemberInfo
EventInfo
EventBase<THandler>
Event<T, THandler>
Implements
IEquatable<EventInfo>
IEvent<T, THandler>
IEvent
IMember<EventInfo>
ICustomAttributeProvider
Inherited Members
EventBase<THandler>.IMember<EventInfo>.RuntimeMember
EventBase<THandler>.DeclaringType
EventBase<THandler>.MemberType
EventBase<THandler>.Name
EventBase<THandler>.ReflectedType
EventBase<THandler>.GetCustomAttributes(Boolean)
EventBase<THandler>.GetCustomAttributes(Type, Boolean)
EventBase<THandler>.IsDefined(Type, Boolean)
EventBase<THandler>.MetadataToken
EventBase<THandler>.Module
EventBase<THandler>.GetCustomAttributesData()
EventBase<THandler>.CustomAttributes
EventBase<THandler>.Attributes
EventBase<THandler>.IsMulticast
EventBase<THandler>.EventHandlerType
EventBase<THandler>.AddMethod
EventBase<THandler>.RaiseMethod
EventBase<THandler>.RemoveMethod
EventBase<THandler>.GetAddMethod(Boolean)
EventBase<THandler>.GetRemoveMethod(Boolean)
EventBase<THandler>.GetRaiseMethod(Boolean)
EventBase<THandler>.GetOtherMethods(Boolean)
EventBase<THandler>.Equals(EventInfo)
EventBase<THandler>.Equals(Object)
EventBase<THandler>.GetHashCode()
EventBase<THandler>.ToString()
EventInfo.GetAddMethod()
EventInfo.GetOtherMethods()
EventInfo.GetRaiseMethod()
EventInfo.GetRemoveMethod()
EventInfo.IsSpecialName
MemberInfo.HasSameMetadataDefinitionAs(MemberInfo)
Object.Equals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public sealed class Event<T, THandler> : EventBase<THandler>, IEquatable<EventInfo>, IEvent<T, THandler>, IEvent, IMember<EventInfo>, ICustomAttributeProvider where THandler : MulticastDelegate
Type Parameters
Name Description
T

Declaring type.

THandler

Type of event handler.

Methods

| Improve this Doc View Source

AddEventHandler(T, THandler)

Adds an event handler to an event source.

Declaration
public void AddEventHandler(in T target, THandler handler)
Parameters
Type Name Description
T target

The event source.

THandler handler

Encapsulates a method or methods to be invoked when the event is raised by the target.

| Improve this Doc View Source

AddEventHandler(Object, THandler)

Adds an event handler to an event source.

Declaration
public override bool AddEventHandler(object target, THandler handler)
Parameters
Type Name Description
Object target

The event source.

THandler handler

Encapsulates a method or methods to be invoked when the event is raised by the target.

Returns
Type Description
Boolean

true, if arguments are correct; otherwise, false.

Overrides
DotNext.Reflection.EventBase<THandler>.AddEventHandler(System.Object, THandler)
| Improve this Doc View Source

AddEventHandler(Object, Delegate)

Adds an event handler to an event source.

Declaration
public override void AddEventHandler(object target, Delegate handler)
Parameters
Type Name Description
Object target

The event source.

Delegate handler

Encapsulates a method or methods to be invoked when the event is raised by the target.

Overrides
EventInfo.AddEventHandler(Object, Delegate)
| Improve this Doc View Source

RemoveEventHandler(T, THandler)

Removes an event handler from an event source.

Declaration
public void RemoveEventHandler(in T target, THandler handler)
Parameters
Type Name Description
T target

The event source.

THandler handler

The delegate to be disassociated from the events raised by target.

| Improve this Doc View Source

RemoveEventHandler(Object, THandler)

Removes an event handler from an event source.

Declaration
public override bool RemoveEventHandler(object target, THandler handler)
Parameters
Type Name Description
Object target

The event source.

THandler handler

The delegate to be disassociated from the events raised by target.

Returns
Type Description
Boolean

true, if arguments are correct; otherwise, false.

Overrides
DotNext.Reflection.EventBase<THandler>.RemoveEventHandler(System.Object, THandler)
| Improve this Doc View Source

RemoveEventHandler(Object, Delegate)

Removes an event handler from an event source.

Declaration
public override void RemoveEventHandler(object target, Delegate handler)
Parameters
Type Name Description
Object target

The event source.

Delegate handler

The delegate to be disassociated from the events raised by target.

Overrides
EventInfo.RemoveEventHandler(Object, Delegate)

Operators

| Improve this Doc View Source

UnaryNegation(Event<T, THandler>)

Returns a delegate which can be used to detach from the event.

Declaration
public static Event<T, THandler>.Accessor operator -(Event<T, THandler> event)
Parameters
Type Name Description
Event<T, THandler> event

Reflected event.

Returns
Type Description
Event.Accessor<>

The delegate which can be used to detach from the event.

| Improve this Doc View Source

UnaryPlus(Event<T, THandler>)

Returns a delegate which can be used to attach new handlers to the event.

Declaration
public static Event<T, THandler>.Accessor operator +(Event<T, THandler> event)
Parameters
Type Name Description
Event<T, THandler> event

Reflected event.

Returns
Type Description
Event.Accessor<>

The delegate which can be used to attach new handlers to the event.

Implements

System.IEquatable<T>
IEvent<T, THandler>
IEvent
IMember<TMember>
System.Reflection.ICustomAttributeProvider

Extension Methods

AsyncLockAcquisition.AcquireLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, CancellationToken)
ObjectExtensions.GetUserData<T>(T)
ObjectExtensions.IsOneOf<T>(T, IEnumerable<T>)
ObjectExtensions.IsOneOf<T>(T, T[])
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, Func<T, TResult1>, Func<T, TResult2>, out TResult1, out TResult2)
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, ValueFunc<T, TResult1>, ValueFunc<T, TResult2>, out TResult1, out TResult2)
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, Func<T, TResult1>, Func<T, TResult2>)
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, ValueFunc<T, TResult1>, ValueFunc<T, TResult2>)
ObjectExtensions.As<T>(T)
CustomAttribute.IsDefined<TAttribute>(ICustomAttributeProvider, Boolean)
LockAcquisition.AcquireReadLock<T>(T)
LockAcquisition.AcquireReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireWriteLock<T>(T)
LockAcquisition.AcquireWriteLock<T>(T, TimeSpan)
LockAcquisition.AcquireUpgradeableReadLock<T>(T)
LockAcquisition.AcquireUpgradeableReadLock<T>(T, TimeSpan)
ExpressionBuilder.Const<T>(T)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX