Open sandboxFocus

Interface IEvent

Represent an event.

Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
public interface IEvent : IHasAccessors, IMember, IMemberOrNamedType, INamedDeclaration, IDeclaration, IDisplayable, IDiagnosticLocation, ICompilationElement, IMeasurable, IEquatable<IDeclaration>, 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.

InitializerExpression

Gets the initializer expression (i.e. the expression at the right hand of the equal sign) of the field-like event, if any. When the event is defined in source code, this property returns an ISourceExpression, which exposes a TypedConstant when possible.

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 EventInfo that represents the current event at run time.

ToRef()

Extension Methods