IdeaBlade.Validation Assembly > IdeaBlade.Validation Namespace : VerifierExecutionModes Enumeration |
'Declaration
<FlagsAttribute()> Public Enum VerifierExecutionModes Inherits System.Enum Implements System.IComparable, System.IConvertible, System.IFormattable
'Usage
Dim instance As VerifierExecutionModes
[Flags()] public enum VerifierExecutionModes : System.Enum, System.IComparable, System.IConvertible, System.IFormattable
Member | Description |
---|---|
All | Verifiers with this mode will be called for all verifications. This is rarely the correct choice; usually InstanceAndOnBeforeSet or InstanceAndOnAfterSet is a better choice. |
Disabled | Disabled - verifiers with this exection mode will not be executed. |
Inherit | Use the setting on the parent, which is usually the VerifierEngine. |
Instance | Verifiers with this mode will be called for any Instance verifications. |
InstanceAndOnAfterSetTriggers | Verifiers with this mode will be called for any Instance verifications and any 'AfterSet' trigger verifications. |
InstanceAndOnBeforeSetTriggers | Verifiers with this mode will be called for any Instance verifications and any 'BeforeSet' trigger verifications. |
OnAfterSetTriggers | Verifiers with this mode will be called for any 'AfterSet' trigger verifications. |
OnBeforeSetTriggers | Verifiers with this mode will be called for any 'BeforeSet' trigger verifications. |
An example of the first would be if we wanted to verify that an instance of an Employee object was completely valid before we save it and in this case we might want to perform a large number of verifications on a number of individual properties of the employee object in order to completely verify its correctness. An example of the second is when we are either in the process of changing or have changed the “HireDate” on an employee and we only want to perform those verifications that are in some way effected by this change. The latter is an example of a “Triggered” verification and the first is an example of an “Instance” verification.
“Triggered” verifications can be further subdivided into “pre” and “post” triggering categories. A “BeforeSet” trigger verification is one that should be applied before some specific change is actually made and a “AfterSet” trigger verification is one where we want to execute the verification immediately after some change has occurred. Any given verifier might be written in such a way as to be applicable under several of these conditions.
System.Object
System.ValueType
System.Enum
IdeaBlade.Validation.VerifierExecutionModes
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