Show / Hide Table of Contents

Class EventBase<D>

Represents reflected event.

Inheritance
Object
EventBase<D>
Event<D>
Event<T, D>
Implements
IEvent
IMember<EventInfo>
ICustomAttributeProvider
IEquatable<EventInfo>
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public class EventBase<D> : EventInfo, IEvent, IMember<EventInfo>, ICustomAttributeProvider, IEquatable<EventInfo> where D : MulticastDelegate
Type Parameters
Name Description
D

A delegate representing event handler.

Properties

| Improve this Doc View Source

AddMethod

Gets event subscription method.

Declaration
public override sealed MethodInfo AddMethod { get; }
Property Value
Type Description
MethodInfo
| Improve this Doc View Source

Attributes

Gets the attributes associated with this event.

Declaration
public override sealed EventAttributes Attributes { get; }
Property Value
Type Description
EventAttributes
| Improve this Doc View Source

CustomAttributes

Gets a collection that contains this member's custom attributes.

Declaration
public override sealed IEnumerable<CustomAttributeData> CustomAttributes { get; }
Property Value
Type Description
IEnumerable<CustomAttributeData>
| Improve this Doc View Source

DeclaringType

Gets the class that declares this constructor.

Declaration
public override sealed Type DeclaringType { get; }
Property Value
Type Description
DotNext.Reflection.Type
| Improve this Doc View Source

EventHandlerType

Gets the the underlying event-handler delegate associated with this event.

Declaration
public override sealed Type EventHandlerType { get; }
Property Value
Type Description
DotNext.Reflection.Type
| Improve this Doc View Source

IsMulticast

Gets a value indicating whether the event is multicast.

Declaration
public override sealed bool IsMulticast { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

MemberType

Always returns .

Declaration
public override sealed MemberTypes MemberType { get; }
Property Value
Type Description
MemberTypes
| Improve this Doc View Source

MetadataToken

Gets a value that identifies a metadata element.

Declaration
public override sealed int MetadataToken { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

Module

Gets the module in which the type that declares the event represented by the current instance is defined.

Declaration
public override sealed Module Module { get; }
Property Value
Type Description
Module
| Improve this Doc View Source

Name

Gets name of the event.

Declaration
public override sealed string Name { get; }
Property Value
Type Description
String
| Improve this Doc View Source

RaiseMethod

Gets the method that is called when the event is raised, including non-public methods.

Declaration
public override sealed MethodInfo RaiseMethod { get; }
Property Value
Type Description
MethodInfo
| Improve this Doc View Source

ReflectedType

Gets the class object that was used to obtain this instance.

Declaration
public override sealed Type ReflectedType { get; }
Property Value
Type Description
DotNext.Reflection.Type
| Improve this Doc View Source

RemoveMethod

Gets event unsubscription method.

Declaration
public override sealed MethodInfo RemoveMethod { get; }
Property Value
Type Description
MethodInfo

Methods

| Improve this Doc View Source

AddEventHandler(Object, D)

Adds an event handler to an event source.

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

The event source.

D 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.

| Improve this Doc View Source

Equals(EventInfo)

Determines whether this event is equal to the given event.

Declaration
public bool Equals(EventInfo other)
Parameters
Type Name Description
EventInfo other

Other event to compare.

Returns
Type Description
Boolean

true if this object reflects the same event as the specified object; otherwise, false.

| Improve this Doc View Source

Equals(Object)

Determines whether this event is equal to the given event.

Declaration
public override sealed bool Equals(object other)
Parameters
Type Name Description
Object other

Other event to compare.

Returns
Type Description
Boolean

true if this object reflects the same event as the specified object; otherwise, false.

| Improve this Doc View Source

GetAddMethod(Boolean)

Gets event subscription method.

Declaration
public override sealed MethodInfo GetAddMethod(bool nonPublic)
Parameters
Type Name Description
Boolean nonPublic

true if non-public methods can be returned; otherwise, false.

Returns
Type Description
MethodInfo

Event subscription method.

| Improve this Doc View Source

GetCustomAttributes(Type, Boolean)

Returns an array of all custom attributes applied to this event.

Declaration
public override sealed object[] GetCustomAttributes(Type attributeType, bool inherit)
Parameters
Type Name Description
DotNext.Reflection.Type attributeType

The type of attribute to search for. Only attributes that are assignable to this type are returned.

Boolean inherit

true to search this member's inheritance chain to find the attributes; otherwise, false.

Returns
Type Description
Object[]

An array that contains all the custom attributes applied to this event.

| Improve this Doc View Source

GetCustomAttributes(Boolean)

Returns an array of all custom attributes applied to this event.

Declaration
public override sealed object[] GetCustomAttributes(bool inherit)
Parameters
Type Name Description
Boolean inherit

true to search this member's inheritance chain to find the attributes; otherwise, false.

Returns
Type Description
Object[]

An array that contains all the custom attributes applied to this event.

| Improve this Doc View Source

GetCustomAttributesData()

Returns a list of custom attributes that have been applied to the target event.

Declaration
public override sealed IList<CustomAttributeData> GetCustomAttributesData()
Returns
Type Description
IList<CustomAttributeData>

The data about the attributes that have been applied to the target event.

| Improve this Doc View Source

GetHashCode()

Computes hash code uniquely identifies the reflected event.

Declaration
public override sealed int GetHashCode()
Returns
Type Description
Int32

The hash code of the event.

| Improve this Doc View Source

GetOtherMethods(Boolean)

Returns the methods that have been associated with the event in metadata using the .other directive, specifying whether to include non-public methods.

Declaration
public override sealed MethodInfo[] GetOtherMethods(bool nonPublic)
Parameters
Type Name Description
Boolean nonPublic

true if non-public methods can be returned; otherwise, false.

Returns
Type Description
MethodInfo[]

An array of event methods.

| Improve this Doc View Source

GetRaiseMethod(Boolean)

Gets the method that is called when the event is raised.

Declaration
public override sealed MethodInfo GetRaiseMethod(bool nonPublic)
Parameters
Type Name Description
Boolean nonPublic

true if non-public methods can be returned; otherwise, false.

Returns
Type Description
MethodInfo

Raise method.

| Improve this Doc View Source

GetRemoveMethod(Boolean)

Gets event unsubscription method.

Declaration
public override sealed MethodInfo GetRemoveMethod(bool nonPublic)
Parameters
Type Name Description
Boolean nonPublic

true if non-public methods can be returned; otherwise, false.

Returns
Type Description
MethodInfo

Event unsubscription method.

| Improve this Doc View Source

IsDefined(Type, Boolean)

Determines whether one or more attributes of the specified type or of its derived types is applied to this event.

Declaration
public override sealed bool IsDefined(Type attributeType, bool inherit)
Parameters
Type Name Description
DotNext.Reflection.Type attributeType

The type of custom attribute to search for. The search includes derived types.

Boolean inherit

true to search this member's inheritance chain to find the attributes; otherwise, false.

Returns
Type Description
Boolean

true if one or more instances of attributeType or any of its derived types is applied to this event; otherwise, false.

| Improve this Doc View Source

RemoveEventHandler(Object, D)

Removes an event handler from an event source.

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

The event source.

D handler

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

Returns
Type Description
Boolean

true, if arguments are correct; otherwise, false.

| Improve this Doc View Source

ToString()

Returns textual representation of this event.

Declaration
public override sealed string ToString()
Returns
Type Description
String

The textual representation of this event.

Explicit Interface Implementations

| Improve this Doc View Source

IMember<EventInfo>.RuntimeMember

Declaration
EventInfo IMember<EventInfo>.RuntimeMember { get; }
Returns
Type Description
EventInfo

Implements

IEvent
IMember<M>
ICustomAttributeProvider
IEquatable<>

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