EventAdapter Class

Namespace
Kampute.DocToolkit.Metadata.Adapters
Assembly
  • Kampute.DocToolkit.dll

Definition

An adapter that wraps a EventInfo and provides metadata access.
public class EventAdapter : VirtualTypeMemberAdapter<EventInfo>, IEvent
Inheritance
Implements

Remarks

This class serves as a bridge between the reflection-based EventInfo and the metadata representation defined by the IEvent interface. It provides access to event-level information regardless of whether the assembly containing the event's type was loaded via Common Language Runtime (CLR) or Metadata Load Context (MLC).

Thread Safety

All public members of the type are guaranteed to be thread-safe.

Constructors

EventAdapter(IType, EventInfo)Initializes a new instance of the EventAdapter class.

Properties

AddMethodGets the add method of the event.
ImplementedEventGets the interface event that this event implements, if any.
IsSpecialNameGets a value indicating whether the member is a special name.
IsStaticGets a value indicating whether the member is static.
IsUnsafeGets a value indicating whether this member is declared as unsafe.
OverriddenEventGets the base event that this event overrides, if any.
RaiseMethodGets the raise method of the event.
RemoveMethodGets the remove method of the event.
TypeGets the type of the event handler.

Methods

FindGenericDefinition()Searches for the generic definition of this member if it is a constructed generic member.
FindImplementedMember()Searches the implemented interfaces for a member that this member implements.
FindOverriddenMember()Searches the base types for a member that this member overrides.
GetAdderMethod()Retrieves the add method for the event.
GetCodeReferenceParts()Retrieves the code reference parts for this member.
GetEventHandlerType()Retrieves the event handler type for the event.
GetMemberVirtuality()Retrieves the virtuality of the member.
GetMemberVisibility()Retrieves the visibility of the member.
GetRaiserMethod()Retrieves the raise method for the event, if it exists.
GetRemoverMethod()Retrieves the remove method for the event.
HasMatchingSignature(IEvent)Determines whether the given eent can be considered a base declaration of this event.

Extension Methods

GetInheritedMember(this IMember)Retrieves the member that this member directly inherits from.
GetMemberDefinition(this IMember)Retrieves the definition of the member, resolving any constructed or decorated forms to their underlying definitions.
TryGetOwnTypeParameters(this IMember, out IEnumerable<ITypeParameter>)Attempts to get the type parameters declared directly by the specified member if it is generic.