Open sandboxFocus

Class QueryExtensions

Extends the IQuery<TDeclaration> interface with some utility methods.

Inheritance
QueryExtensions
Namespace: Metalama.Framework.Fabrics
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public static class QueryExtensions

Methods

Name Description
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.

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.

SelectReferencedAssembly(IQuery<ICompilation>, string)

Selects a reference assembly in the current compilation given its assembly name.

SelectReflectionType(IQuery<ICompilation>, Type)

Selects an INamedType in the current compilation or in a reference assembly given its reflection Type.

SelectReflectionTypes(IQuery<ICompilation>, IEnumerable<Type>)

Selects several INamedType in the current compilation or in a reference assembly given their reflection Type.

SelectReflectionTypes(IQuery<ICompilation>, params Type[])

Selects several INamedType in the current compilation or in a reference assembly given their reflection Type.