Open sandboxFocus

Method GetDeclarationsWithAttribute

GetDeclarationsWithAttribute<TAttribute>(ICompilation, Func<TAttribute, bool>?, bool)

Declaration
public static IEnumerable<IDeclaration> GetDeclarationsWithAttribute<TAttribute>(this ICompilation compilation, Func<TAttribute, bool>? predicate = null, bool includeDerivedTypes = true)
Parameters
Type Name Description
ICompilation compilation
Func<TAttribute, bool> predicate
bool includeDerivedTypes
Returns
Type Description
IEnumerable<IDeclaration>
Type Parameters
Name Description
TAttribute

GetDeclarationsWithAttribute(ICompilation, Type, Func<IAttribute, bool>?, bool)

Declaration
public static IEnumerable<IDeclaration> GetDeclarationsWithAttribute(this ICompilation compilation, Type attributeType, Func<IAttribute, bool>? predicate = null, bool includeDerivedTypes = true)
Parameters
Type Name Description
ICompilation compilation
Type attributeType
Func<IAttribute, bool> predicate
bool includeDerivedTypes
Returns
Type Description
IEnumerable<IDeclaration>