Open sandboxFocus

Method GetInboundReferences

GetInboundReferences(IDeclaration, IntrospectionChildKinds, CancellationToken)

Gets all inbound references to a specified declaration, i.e., all code locations that reference the destination.

Declaration
IEnumerable<IIntrospectionReference> GetInboundReferences(IDeclaration destination, IntrospectionChildKinds childKinds = IntrospectionChildKinds.ContainingDeclaration, CancellationToken cancellationToken = default)
Parameters
Type Name Description
IDeclaration destination

The declaration to find references to.

IntrospectionChildKinds childKinds

Specifies whether to include references to child declarations.

CancellationToken cancellationToken

A token to cancel the operation.

Returns
Type Description
IEnumerable<IIntrospectionReference>

An enumerable of all references pointing to the destination declaration.