src/Shared/EntityFramework/Internal/Validation/EntityValidatorBuilder.cs
// <summary>
// Builds the validator for a given <paramref name="complexType" /> and the corresponding
// <paramref name="clrType" />.
// </summary>
// <param name="clrType"> The CLR type that corresponds to the EDM complex type. </param>
// <param name="complexType"> The EDM complex type that type level validation is built for. </param>
// <returns>
// A <see cref="ComplexTypeValidator" /> for the given complex type. May be null if no validation specified.
// </returns>
Builds the validator for a given  and the corresponding
.
Builds the validator for a given and the corresponding .
protected virtual ComplexTypeValidator BuildComplexTypeValidator(Type clrType, ComplexType complexType)
        {
            DebugCheck.NotNull(complexType);
            DebugCheck.NotNull(clrType);
            Debug.Assert(complexType.Name == clrType.Name);
            return BuildTypeValidator(
                clrType,
                complexType.Properties,
                Enumerable.Empty<NavigationProperty>(),
                (propertyValidators, typeLevelValidators) =>
                new ComplexTypeValidator(propertyValidators, typeLevelValidators));
        }
protected virtual ComplexTypeValidator BuildComplexTypeValidator ( Type clrType , ComplexType complexType ) { DebugCheck . NotNull ( complexType ) ; DebugCheck . NotNull ( clrType ) ; Debug . Assert ( complexType . Name == clrType . Name ) ; return BuildTypeValidator ( clrType , complexType . Properties , Enumerable . Empty < NavigationProperty > ( ) , ( propertyValidators , typeLevelValidators ) => new ComplexTypeValidator ( propertyValidators , typeLevelValidators ) ) ; }
Builds the validator for a given  and the corresponding
.
Builds the validator for a given and the corresponding .
A  for the given complex type. May be null if no validation specified.
A for the given complex type . May be null if no validation specified .
clrType
Type
The CLR type that corresponds to the EDM complex type.
The CLR type that corresponds to the EDM complex type .
complexType
ComplexType
The EDM complex type that type level validation is built for.
The EDM complex type that type level validation is built for .