Open sandboxFocus

Method ValidateInboundReferences

ValidateInboundReferences<TDeclaration>(IQuery<TDeclaration>, Action<ReferenceValidationContext>, ReferenceGranularity, ReferenceKinds, ReferenceValidationOptions)

Registers an inbound reference validator, provided as a delegate. The reference validator will be invoked to validate any references pointing to to any declaration in the current set. This method must have a parameter of type inReferenceValidationContext. Only source code references are validated. References added by aspects are ignored by design.

Declaration
public static void ValidateInboundReferences<TDeclaration>(this IQuery<TDeclaration> query, Action<ReferenceValidationContext> validateMethod, ReferenceGranularity granularity, ReferenceKinds referenceKinds = (ReferenceKinds)-1, ReferenceValidationOptions options = ReferenceValidationOptions.Default) where TDeclaration : class, IDeclaration
Parameters
Type Name Description
IQuery<TDeclaration> query

A query selecting the declarations to validate.

Action<ReferenceValidationContext> validateMethod

A delegate to a method of a fabric, aspect or validator class.

ReferenceGranularity granularity

The level of declarations at which the analysis should be performed. For instance, if validateMethod returns the same result for all references in the same namespace, Namespace should be used.

ReferenceKinds referenceKinds

Kinds of references that this method is interested to analyze. By default, all references are analyzed.

ReferenceValidationOptions options
Type Parameters
Name Description
TDeclaration

ValidateInboundReferences<TDeclaration>(IQuery<TDeclaration>, InboundReferenceValidator)

Registers an inbound reference validator, provided as an instance of the InboundReferenceValidator abstract class. The reference validator will be invoked to validate any references pointing to any declaration in the current set. Only source code references are validated. References added by aspects are ignored by design.

Declaration
public static void ValidateInboundReferences<TDeclaration>(this IQuery<TDeclaration> query, InboundReferenceValidator validator) where TDeclaration : class, IDeclaration
Parameters
Type Name Description
IQuery<TDeclaration> query
InboundReferenceValidator validator
Type Parameters
Name Description
TDeclaration

ValidateInboundReferences<TDeclaration, TValidator>(IQuery<TDeclaration>, Func<TDeclaration, TValidator>)

Registers a reference validator, provided by a delegate that provides an instance of the ReferenceValidator abstract class. The reference validator will be invoked to validate references to any declaration in the current set. Only source code references are validated. References added by aspects are ignored by design.

Declaration
public static void ValidateInboundReferences<TDeclaration, TValidator>(this IQuery<TDeclaration> query, Func<TDeclaration, TValidator> validator) where TDeclaration : class, IDeclaration where TValidator : InboundReferenceValidator
Parameters
Type Name Description
IQuery<TDeclaration> query
Func<TDeclaration, TValidator> validator
Type Parameters
Name Description
TDeclaration
TValidator

ValidateInboundReferences<TDeclaration, TTag, TValidator>(ITaggedQuery<TDeclaration, TTag>, Func<TDeclaration, TTag, TValidator>)

Registers a reference validator, provided by a delegate that provides an instance of the ReferenceValidator abstract class. The reference validator will be invoked to validate references to any declaration in the current set. Only source code references are validated. References added by aspects are ignored by design.

Declaration
public static void ValidateInboundReferences<TDeclaration, TTag, TValidator>(this ITaggedQuery<TDeclaration, TTag> query, Func<TDeclaration, TTag, TValidator> validator) where TDeclaration : class, IDeclaration where TValidator : InboundReferenceValidator
Parameters
Type Name Description
ITaggedQuery<TDeclaration, TTag> query
Func<TDeclaration, TTag, TValidator> validator
Type Parameters
Name Description
TDeclaration
TTag
TValidator