IdeaBlade.Validation Assembly > IdeaBlade.Validation Namespace : IVerifierProvider Interface |
'Declaration
<InterfaceExportAttribute(ContractName="", ContractType=IdeaBlade.Validation.IVerifierProvider)> Public Interface IVerifierProvider
'Usage
Dim instance As IVerifierProvider
[InterfaceExport(ContractName="", ContractType=IdeaBlade.Validation.IVerifierProvider)] public interface IVerifierProvider
public class EmployeeVerifierProvider : IVerifierProvider { public IEnumerable<Verifier> GetVerifiers(Object verifierProviderContext) { // Return a few verifiers. yield return GetFirstNameVerifier(); yield return GetLastNameVerifier(); } private Verifier GetLastNameVerifier() { return new StringLengthVerifier(typeof(Employee), "LastName", true, 3, 15); } private Verifier GetFirstNameVerifier() { return new StringLengthVerifier(typeof(Employee), Employee.PathFor(e => e.FirstName), false, null, 50); } }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2