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.
Namespace: Metalama.Extensions.Architecture.Fabrics
Assembly: Metalama.Extensions.Architecture.dll
Syntax
[CompileTime]
[Obsolete]
public static class VerifierExtensions
Methods
Name | Description |
---|---|
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. |
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. |
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 |
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. |
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. |
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. |
MustRespectNamingConvention(IVerifier<INamedDeclaration>, string) | Reports a warning when the target declaration does not respect the given naming convention, with the asterisk character ( |
MustRespectRegexNamingConvention(IVerifier<INamedDeclaration>, string) | Reports a warning when the target declaration does not respect the given naming convention, given as a regular expression. |
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 Type. |
SelectTypes(IVerifier<ICompilation>, params Type[]) | Gets a set of types in the current ICompilation, where types are given as a list of array of Type. |
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. |
Types(ITypeSetVerifier<IDeclaration>) | Gets the set of types in the current ICompilation or INamespace. |
Where(ITypeSetVerifier<INamedType>, Func<INamedType, bool>) | Gets a new set of types obtained by filtering the current set. |
Where<T>(IVerifier<T>, Func<T, bool>) | Filters the declarations in the current set. |
WithReferencedAssembly(ITypeSetVerifier<ICompilation>, string) | Represents a fluent TypeSetVerifier<T> that allows to validate code using a given assembly referenced by the current compilation. This method can only be used in a ProjectFabric. |