
Visual Basic (Declaration) | |
---|---|
Public Class VerifierEngine |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As VerifierEngine |
C# | |
---|---|
public class VerifierEngine |
C++/CLI | |
---|---|
public ref class VerifierEngine |
Verifiers may be added to a VerifierEngine in several ways. They can be automatically discovered via attributes and code embedded directly within the types to be verified; they can be added programmatically; and they can be loaded from a configuration file. Any combination of these methods is also possible.
Attributes for StringLengthVerifier and RequiredValueVerifier are automatically generated by DevForce for the properties of your entities where appropriate. You can mark up your entities, and other .NET types, for other verifiers such as RangeVerifierAttribute and RegexVerifierAttribute. You can also implement the IVerifierProvider interface to provide a custom method returning a collection of verifiers, to be called during verifier discovery.
To programmatically add a verifier to the engine, use the VerifierEngine.AddVerifier method. To load verifiers from a configuration file, use DiscoverVerifiersFromConfig. To remove a verifier from the engine, use RemoveVerifier. Use the ErrorsResourceManager to supply custom or localized error messages for verification failures.
DevForce will automatically execute appropriate before set and after set verifiers for properties of your entities. You can also call any of the Execute(Object) overloads directly for instance-level verification.
See the "Validation through Verification" chapter in the Learning Resources for more information.
System.Object
IdeaBlade.Validation.VerifierEngine
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family