EventElement Class

An event.

public sealed class EventElement : MemberElement
Inheritance
MemberElement EventElement

Properties

NameDescription
AccessibilityGets the declared accessibility of the member.
AdderGets the add accessor, or null.
AttributesGets the attributes applied to the member.
IsStaticGets a value indicating whether the member is static.
LocationGets the first statement of the member when the PDB is available, or null.
RemoverGets the remove accessor, or null.
TypeGets the type of the event, a delegate type.

Accessibility

EventElement.cs

Gets the declared accessibility of the member.

public override ElementAccessibility Accessibility { get; }

Property value

ElementAccessibility

Gets the add accessor, or null.

public MethodElement? Adder { get; }

Property value

MethodElement?

Attributes

EventElement.cs

Gets the attributes applied to the member.

public override IReadOnlyList<AttributeElement> Attributes { get; }

Gets a value indicating whether the member is static.

public override bool IsStatic { get; }

Property value

bool

Gets the first statement of the member when the PDB is available, or null.

public override SourceLocation? Location { get; }

Property value

SourceLocation?

Gets the remove accessor, or null.

public MethodElement? Remover { get; }

Property value

MethodElement?

Gets the type of the event, a delegate type.

public TypeReference Type { get; }

Property value

TypeReference