SelectDeclarationsWithAttribute<TAttribute>(IQuery<ICompilation>, Func<TAttribute, bool>?, bool)
Selects all custom attributes of a given type in the current compilation. This generic overloads constructs the attribute and accepts an optional predicate to filter the attribute.
Declaration
public static IQuery<IDeclaration> SelectDeclarationsWithAttribute<TAttribute>(this IQuery<ICompilation> receiver, Func<TAttribute, bool>? predicate = null, bool includeDerivedTypes = true)Parameters
| Type | Name | Description |
|---|---|---|
| IQuery<ICompilation> | receiver | |
| Func<TAttribute, bool> | predicate | |
| bool | includeDerivedTypes |
Returns
| Type | Description |
|---|---|
| IQuery<IDeclaration> |
Type Parameters
| Name | Description |
|---|---|
| TAttribute |
SelectDeclarationsWithAttribute(IQuery<ICompilation>, Type, Func<IAttribute, bool>?, bool)
Selects all custom attributes of a given type in the current compilation. This overloads accepts an optional predicate to filter the attribute.
Declaration
public static IQuery<IDeclaration> SelectDeclarationsWithAttribute(this IQuery<ICompilation> receiver, Type attributeType, Func<IAttribute, bool>? predicate = null, bool includeDerivedTypes = true)Parameters
| Type | Name | Description |
|---|---|---|
| IQuery<ICompilation> | receiver | |
| Type | attributeType | |
| Func<IAttribute, bool> | predicate | |
| bool | includeDerivedTypes |
Returns
| Type | Description |
|---|---|
| IQuery<IDeclaration> |