MetalamaAPI documentationExtensions APIMetalama.​Extensions.​Architecture.​FabricsVerifier­Extensions
Open sandboxFocus

VerifierExtensions Class

Extension methods that verify the architecture. These methods extend the IVerifier<T> interface, which is returned by the Verify(IProjectAmender) method of the AmenderExtensions class.

Inheritance
System.Object
VerifierExtensions
Namespace: Metalama.Extensions.Architecture.Fabrics
Assembly: Metalama.Extensions.Architecture.dll
Syntax
[CompileTime]
public static class VerifierExtensions : Object

Methods

Name Description
CannotBeUsedFrom(IVerifier<IDeclaration>, Func<ReferencePredicateBuilder, ReferencePredicate>, String, ReferenceKinds)

Reports a warning when any type in the current scope is used from the context matching the specified predicate.

CanOnlyBeUsedFrom(IVerifier<IDeclaration>, Func<ReferencePredicateBuilder, ReferencePredicate>, String, ReferenceKinds)

Reports a warning when any type in the current scope is used from a different context than the ones matching the specified predicate.

DerivedTypesMustRespectNamingConvention(ITypeSetVerifier<IDeclaration>, String, Func<ReferencePredicateBuilder, ReferencePredicate>)

Reports a warning when any type that inherits any type in the current scope does not follow a given convention, where the convention is given as a star pattern, i.e. where the * matches any sequence of characters, even empty.

DerivedTypesMustRespectRegexNamingConvention(ITypeSetVerifier<IDeclaration>, String, Func<ReferencePredicateBuilder, ReferencePredicate>)

Reports a warning when any type that inherits any type in the current scope does not follow a given convention, where the convention is given as a regular expression.

Experimental(IVerifier<IDeclaration>)

Reports a warning when the target declaration is used by a declaration that it not itself marked as experimental.

InternalsCannotBeUsedFrom(ITypeSetVerifier<IDeclaration>, Func<ReferencePredicateBuilder, ReferencePredicate>, String, ReferenceKinds)

Reports a warning when any of the internal APIs of the current scope in used from a different context different than the one allowed, except if this concept has access to the type using inheritance rules.

InternalsCanOnlyBeUsedFrom(ITypeSetVerifier<IDeclaration>, Func<ReferencePredicateBuilder, ReferencePredicate>, String, ReferenceKinds)

Reports a warning when any of the internal APIs of the current scope in used from a different context than the one allowed, except if this concept has access to the type using inheritance rules.

MustRespectNamingConvention(IVerifier<INamedDeclaration>, String)

Reports a warning when the target declaration does not respect the given naming convention, with the asterisk character (*) matching any substring.

MustRespectRegexNamingConvention(IVerifier<INamedDeclaration>, String)

Reports a warning when the target declaration does not respect the given naming convention, given as a regular expression.

Select<T>(IVerifier<T>, Func<T, INamedType>)

Selects a single type of the current ICompilation or INamespace.

Select<TIn, TOut>(IVerifier<TIn>, Func<TIn, TOut>)

Selects a member of the current declaration.

SelectMany<T>(IVerifier<T>, Func<T, IEnumerable<INamedType>>)

Selects types of the current ICompilation or INamespace.

SelectMany<TIn, TOut>(IVerifier<TIn>, Func<TIn, IEnumerable<TOut>>)

Selects several members of the current declaration.

SelectTypes(IVerifier<ICompilation>, IEnumerable<Type>)

Gets a set of types in the current ICompilation, where types are given as an enumeration of System.Type.

SelectTypes(IVerifier<ICompilation>, Type[])

Gets a set of types in the current ICompilation, where types are given as a list of array of System.Type.

Types(ITypeSetVerifier<IDeclaration>)

Gets the set of types in the current ICompilation or INamespace.

Where(ITypeSetVerifier<INamedType>, Func<INamedType, Boolean>)

Gets a new set of types obtained by filtering the current set.

Where<T>(IVerifier<T>, Func<T, Boolean>)

Filters the declarations in the current set.

WithReferencedAssembly(ITypeSetVerifier<ICompilation>, String)

Represents a fluent Metalama.Extensions.Architecture.Fabrics.TypeSetVerifier`1 that allows to validate code using a given assembly referenced by the current compilation. This method can only be used in a ProjectFabric.