Table of Contents

Interface IEvent

Namespace
NDepend.CodeModel
Assembly
NDepend.API.dll

Represents an event declared in an application assembly, or declared in a third-party assembly and used by the application code.

public interface IEvent : IMember, IAttributeTarget, IUser, ICodeElement, IUsed
Inherited Members
Extension Methods

Properties (20)

AccessorsAndBackingField

Returns a sequence of IMember object that contains the available get method, set method and backing field for this property.

IEnumerable<IMember> AccessorsAndBackingField { get; }

Property Value

IEnumerable<IMember>

AddMethod

Returns the event's add accessor method.

IMethod AddMethod { get; }

Property Value

IMethod

BackingField

When the add and remove accessors of an event are not defined explicitly, the compiler defines a backing filed for the event. Returns this field if it exists, else returns null.

IField BackingField { get; }

Property Value

IField

EventType

Gets the type of this event. Gets null if the return type of this event is not in the scope of assemblies analyzed defined by IProject.CodeToAnalyze.

IType EventType { get; }

Property Value

IType

FieldsAssigned

Gets a sequence of fields assigned by this event's add or remove accessor.

IEnumerable<IField> FieldsAssigned { get; }

Property Value

IEnumerable<IField>

FieldsUsed

Gets a sequence of fields used by this event's add or remove accessor.

IEnumerable<IField> FieldsUsed { get; }

Property Value

IEnumerable<IField>

IsAbstract

Gets a value indicating whether this event is abstract.

bool IsAbstract { get; }

Property Value

bool

IsExplicitInterfaceImpl

Gets a value indicating whether this event is an explicit interface method implementation.

bool IsExplicitInterfaceImpl { get; }

Property Value

bool

IsFinal

Gets a value indicating whether this event is final.

bool IsFinal { get; }

Property Value

bool

IsNewSlot

Gets a value indicating whether this event is new-slot.

bool IsNewSlot { get; }

Property Value

bool

Remarks

Certainly the best resource on the web about this new slot advanced topic is this stackoverflow Q&A
Internally, NDepend relies on this new slot value to compute the override/overriden methods sets in IMethod event getter OverriddensBase, OverridesDerived and OverridesDirectDerived.

IsVirtual

Gets a value indicating whether this event is virtual.

bool IsVirtual { get; }

Property Value

bool

MembersUsed

Gets a sequence of methods, events, fields and events called by this event's add or remove accessor.

IEnumerable<IMember> MembersUsed { get; }

Property Value

IEnumerable<IMember>

MethodsCalled

Gets a sequence of methods called by this event's add or remove accessor.

IEnumerable<IMethod> MethodsCalled { get; }

Property Value

IEnumerable<IMethod>

MethodsSubscribingToMe

Gets a sequence of methods that are consuming this event's add accessor.

IEnumerable<IMethod> MethodsSubscribingToMe { get; }

Property Value

IEnumerable<IMethod>

MethodsUnsubscribingToMe

Gets a sequence of methods that are consuming this event's remove accessor.

IEnumerable<IMethod> MethodsUnsubscribingToMe { get; }

Property Value

IEnumerable<IMethod>

MethodsUsingMe

Gets a sequence of methods that are consuming this event's add or remove accessor.

IEnumerable<IMethod> MethodsUsingMe { get; }

Property Value

IEnumerable<IMethod>

OverriddensBase

Gets a sequence of events declared in this event ParentType.BaseClasses and InterfacesImplemented, overridden by this event. If this event doesn't override any event, gets an empty sequence.

IEnumerable<IEvent> OverriddensBase { get; }

Property Value

IEnumerable<IEvent>

Remarks

A sequence of events overridden by this event is also returned even if this event is declared in a third-party assembly.
This event getter has a O(this.ParentType.DepthOfInheritance.Count) time complexity.

See Also

OverridesDerived

Gets a sequence of events declared in this event ParentType.DerivedTypes, overriding this event. If this event is not overridden, gets an empty sequence.

IEnumerable<IEvent> OverridesDerived { get; }

Property Value

IEnumerable<IEvent>

Remarks

A sequence of events overriding this event is also returned even if this event is declared in a third-party assembly.
Properties for which IsNewSlot is true, are not in the returned sequence.
This event getter has a O(this.ParentType.NbChildren.Count) time complexity.

See Also

OverridesDirectDerived

Gets a sequence of events declared in this event ParentType.DirectDerivedTypes, overriding this event. If this event is not overridden, gets an empty sequence.

IEnumerable<IEvent> OverridesDirectDerived { get; }

Property Value

IEnumerable<IEvent>

Remarks

A sequence of events overriding this event is also returned even if this event is declared in a third-party assembly.
Methods for which IsNewSlot is true, are not in the returned sequence.
This event getter has a O(this.ParentType.NbChildren.Count) time complexity.

See Also

RemoveMethod

Returns the event's remove accessor method.

IMethod RemoveMethod { get; }

Property Value

IMethod