Metalama (preview)API documentationAspect APIMetalama.​Framework.​ValidationReference­Granularity
Open sandboxFocus

ReferenceGranularity Enum

Levels of granularity on which a validation can be performed. The order of enum values are from the coarsest to the finest level. The finer the granularity of a validator, the more resources it will consume.

Namespace: Metalama.Framework.Validation
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public enum ReferenceGranularity : byte

Fields

Name Description
Compilation

Sets the validator granularity to the level of whole compilation.

Member

Sets the validator granularity to the level of methods, fields, events, or constructors.

Namespace

Sets the validator granularity to the level of namespaces (possibly the global namespace).

ParameterOrAttribute

Sets the validator granularity to the level of parameters, type parameters, custom attributes.

SyntaxNode

Sets the validator granularity to the level of syntax nodes. This level exists for backward compatibility. It should not be used, as it has no benefit over the next finest level, only a performance cost.

TopLevelType

Sets the validator granularity to the level of top-level types, i.e. the types directly belonging to the namespace, as opposed to a nested type.

Type

Sets the validator granularity to the level of types, possibly nested types.

Extension Methods

ReferenceGranularityExtension.CombineWith(ReferenceGranularity, ReferenceGranularity)