MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeIEvent
Open sandboxFocus

IEvent Interface

Represent an event.

Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
public interface IEvent : IHasAccessors, IMember, IMemberOrNamedType, INamedDeclaration, IDeclaration, IDisplayable, IDiagnosticLocation, ICompilationElement, IMeasurable, IHasType, IEventInvoker

Properties

Name Description
AddMethod

Gets the method implementing the add semantic. In case of field-like events, this property returns an object that does not map to source code but allows to add aspects and advice as with a normal method.

Definition

Gets the definition of the event. If the current declaration is an event of a generic type instance, this returns the event in the generic type definition. Otherwise, it returns the current instance.

ExplicitInterfaceImplementations

Gets a list of interface events this event explicitly implements.

OverriddenEvent

Gets the base event that is overridden by the current event.

RaiseMethod

Gets an object that represents the raise semantic and allows to add aspects and advice as with a normal method.

RemoveMethod

Gets the method implementing the remove semantic. In case of field-like events, this property returns an object that does not map to source code but allows to add aspects and advice as with a normal method.

Signature
Type

Gets the type of the event, i.e. the type of the delegate.

Methods

Name Description
ToEventInfo()

Gets an System.Reflection.EventInfo that represents the current event at run time.

Extension Methods

GenericExtensions.GetOriginalDefinition(IEvent)
GenericExtensions.ForTypeInstance(IEvent, INamedType)
SymbolExtensions.GetSymbol(IEvent)