Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Code / Declaration­Extensions / Is­Contained­In

Method IsContainedIn

IsContainedIn(IDeclaration, IDeclaration)

Determines if a given declaration is a child of another given declaration, using the ContainingDeclaration relationship for all declarations except for named type, where the parent namespace is considered.

Declaration
public static bool IsContainedIn(this IDeclaration declaration, IDeclaration containingDeclaration)
Parameters
Type Name Description
IDeclaration declaration
IDeclaration containingDeclaration
Returns
Type Description
Boolean