Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Code / Declaration­Extensions / Containing­Ancestors

Method ContainingAncestors

ContainingAncestors(IDeclaration)

Gets all containing ancestors, i.e. declaration.ContainingDeclaration, declaration.ContainingDeclaration.ContainingDeclaration, declaration.ContainingDeclaration.ContainingDeclaration.ContainingDeclaration...

Declaration
public static IEnumerable<IDeclaration> ContainingAncestors(this IDeclaration declaration)
Parameters
Type Name Description
IDeclaration declaration
Returns
Type Description
IEnumerable<IDeclaration>