Show / Hide Table of Contents

Class BuilderValidatedTypeProvider

Default implementation of IGetsValidatedTypeForBuilderType which uses reflection and Linq to determine the builder type's generic type.

Inheritance
System.Object
BuilderValidatedTypeProvider
Implements
IGetsValidatedTypeForBuilderType
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CSF.Validation.ValidatorBuilding
Assembly: CSF.Validation.dll
Syntax
public class BuilderValidatedTypeProvider : IGetsValidatedTypeForBuilderType

Methods

| Improve this Doc View Source

GetValidatedType(Type)

Gets the generic validated type appropriate for the specified builderType.

Declaration
public Type GetValidatedType(Type builderType)
Parameters
Type Name Description
System.Type builderType

A type that indicates a validator builder.

Returns
Type Description
System.Type

The System.Type for which the specified builder type validates.

Remarks

A builder type is one which implements the interface IBuildsValidator<TValidated>. This method gets the value of the generic type parameter used for that interface.

In order to be used with this method, the builderType must implement IBuildsValidator<TValidated> for precisely one generic type. If the builder type implements the interface more than once then this method will be unable to return a definitive result and will throw an exception.

Implements

IGetsValidatedTypeForBuilderType
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX