Show / Hide Table of Contents

Class Event<D>

Provides typed access to static event declared in type D.

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

Type of event handler.

Methods

| Improve this Doc View Source

AddEventHandler(D)

Add event handler.

Declaration
public void AddEventHandler(D handler)
Parameters
Type Name Description
D handler

An event handler to add.

| Improve this Doc View Source

AddEventHandler(Object, D)

Adds static event handler.

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

Should be null.

D handler

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

Returns
Type Description
Boolean

true, if target is null, false.

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

AddEventHandler(Object, Delegate)

Adds static event handler.

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

Should be null.

Delegate handler

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

| Improve this Doc View Source

RemoveEventHandler(D)

Remove event handler.

Declaration
public void RemoveEventHandler(D handler)
Parameters
Type Name Description
D handler

An event handler to remove.

| Improve this Doc View Source

RemoveEventHandler(Object, D)

Removes static event handler.

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

Should be null.

D handler

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

Returns
Type Description
Boolean

true, if target is null, false.

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

RemoveEventHandler(Object, Delegate)

Removes static event handler.

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

Should be null.

Delegate handler

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

Operators

| Improve this Doc View Source

UnaryNegation(Event<D>)

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

Declaration
public static Action<D> operator -(Event<D> event)
Parameters
Type Name Description
Event<D> event

Reflected event.

Returns
Type Description
Action<D>

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

| Improve this Doc View Source

UnaryPlus(Event<D>)

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

Declaration
public static Action<D> operator +(Event<D> event)
Parameters
Type Name Description
Event<D> event

Reflected event.

Returns
Type Description
Action<D>

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

Implements

IEquatable<>
IEvent<H>
IEvent
IMember<M>
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)
ExpressionBuilder.Const<T>(T)
ObjectExtensions.GetUserData<T>(T)
ObjectExtensions.IsOneOf<T>(T, IEnumerable<T>)
ObjectExtensions.IsOneOf<T>(T, T[])
ObjectExtensions.Decompose<T, R1, R2>(T, Func<T, R1>, Func<T, R2>, out R1, out R2)
ObjectExtensions.Decompose<T, R1, R2>(T, ValueFunc<T, R1>, ValueFunc<T, R2>, out R1, out R2)
ObjectExtensions.Decompose<T, R1, R2>(T, Func<T, R1>, Func<T, R2>)
ObjectExtensions.Decompose<T, R1, R2>(T, ValueFunc<T, R1>, ValueFunc<T, R2>)
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)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX