Open sandboxFocus

Class ReferencePredicateExtensions

Extension methods for ReferencePredicate and ReferencePredicateBuilder.

Inheritance
ReferencePredicateExtensions
Namespace: Metalama.Extensions.Architecture.Predicates
Assembly: Metalama.Extensions.Architecture.dll
Syntax
[CompileTime]
public static class ReferencePredicateExtensions

Methods

Name Description
All(ReferencePredicateBuilder, params Func<ReferencePredicateBuilder, ReferencePredicate>[])

Combines several other predicates with the and condition.

All(ReferencePredicateBuilder, Func<ReferencePredicateBuilder, IEnumerable<ReferencePredicate>>)

Combines several other predicates with the and condition.

Always(ReferencePredicateBuilder)

Returns a predicate that always evaluate to true.

And(ReferencePredicate)
And(ReferencePredicate, ReferencePredicate)

Combines two predicates with the and condition. This overload accepts the second predicate as a ReferencePredicate.

And(ReferencePredicate, Func<ReferencePredicateBuilder, ReferencePredicate>)

Combines two predicates with the and condition. This overload accepts the second predicate as a delegate.

Any(ReferencePredicateBuilder, params Func<ReferencePredicateBuilder, ReferencePredicate>[])

Combines several other predicates with the or condition.

Any(ReferencePredicateBuilder, Func<ReferencePredicateBuilder, IEnumerable<ReferencePredicate>>)

Combines several other predicates with the or condition.

AnyType(ReferencePredicateBuilder, params INamedType[])

Accepts code references contained in any type in a given list. Types are specified as INamedType objects.

AnyType(ReferencePredicateBuilder, IEnumerable<INamedType>)

Accepts code references contained in any type in a given list. Types are specified as INamedType objects.

AnyType(ReferencePredicateBuilder, IEnumerable<Type>)

Accepts code references contained in any type in a given list. Types are specified as reflection Type objects.

AnyType(ReferencePredicateBuilder, params Type[])

Accepts code references contained in any type in a given list. Types are specified as reflection Type objects.

Assembly(ReferencePredicateBuilder, string)

Accepts code references contained in a given assembly.

CurrentAssembly(ReferencePredicateBuilder)

Accepts code references contained in the current assembly.

CurrentNamespace(ReferencePredicateBuilder)

Accepts code references contained in the current namespace.

HasFamilyAccess(ReferencePredicateBuilder)

Accepts code references that are legitimate based on family access rules, but rejects code references that are legitimate according to other rules.

Namespace(ReferencePredicateBuilder, INamespace)
Namespace(ReferencePredicateBuilder, string)

Accepts code references contained in a given namespace.

NamespaceOf(ReferencePredicateBuilder, Type)

Accepts code references contained in the namespace of a given type.

Not(ReferencePredicate)

Inverts the given predicate.

Not(ReferencePredicateBuilder)
Or(ReferencePredicate)
Or(ReferencePredicate, ReferencePredicate?)

Combines two predicates with the or condition. This overload accepts the second predicate as a ReferencePredicate.

Or(ReferencePredicate, Func<ReferencePredicateBuilder, ReferencePredicate>)

Combines two predicates with the or condition. This overload accepts the second predicate as a delegate.

Type(ReferencePredicateBuilder, INamedType)

Accepts code references contained in a given type, specified as an INamedType.

Type(ReferencePredicateBuilder, string)

Accepts code references contained in a given type specified as a string, optionally containing wildcards * or **.

Type(ReferencePredicateBuilder, Type)

Accepts code references contained in a given type, specified as a reflection Type.