OpenPetra
Free Administration Software for Non-Profits
|
Helper Methods for dealing with TVerificationResults. More...
Static Public Member Functions | |
static bool | AreVerificationResultsIdentical (TVerificationResult AVerificationResult1, TVerificationResult AVerificationResult2, bool ACompareResultContextsAsStrings=false) |
Checks whether two TVerificationResults are completely identical. The comparison takes all the data they hold into consideration. More... | |
static bool | IsNullOrOnlyNonCritical (TVerificationResultCollection AVerificationResult) |
Checks that a TVerificationResultCollection is either null or that it doesn't contain any TVerificationResult items that are 'CriticalErrors'! More... | |
static string | FormatVerificationCollectionItems (TVerificationResultCollection AVerifColl) |
Creates a string that contains the data of all the TVerificationResults in the Collection. More... | |
static void | SetColumnErrorText (DataColumnChangeEventArgs AEventArgs, TVerificationResult AVerificationResultEntry, String AControlName, Boolean AResetValue) |
Calls the M:DataRow.SetColumnError(DataColumn, String) Method of a DataRow's Column to the TVerificationResult.ResultText Property of the passed in TVerificationResult. More... | |
static bool | ResultsContainErrorCode (TVerificationResultCollection AResultsCollection, string AErrorCode) |
Examines a TVerificationResultCollection and returns true if one of the results has the specified error code More... | |
Helper Methods for dealing with TVerificationResults.
|
inlinestatic |
Checks whether two TVerificationResults are completely identical. The comparison takes all the data they hold into consideration.
AVerificationResult1 | First TVerificationResult. |
AVerificationResult2 | Second TVerificationResult. |
ACompareResultContextsAsStrings | Set to true to compare the ResultContexts not as objects, but compare what a call of the .ToString() Method on the two object yields. (Default: false.) |
|
inlinestatic |
Creates a string that contains the data of all the TVerificationResults in the Collection.
|
inlinestatic |
Checks that a TVerificationResultCollection is either null or that it doesn't contain any TVerificationResult items that are 'CriticalErrors'!
Prefer using this Method over the use of the TVerificationResultCollection.HasCriticalErrors Method, as using the latter involves a null check on the TVerificationResultCollection to guard against a NullReferenceException in case the TVerificationResultCollection is null — IsNullOrOnlyNonCritical takes care of that! In the context of Unit Testing this Method can be used for 'Guard Asserts' to check that the TVerificationResultCollection that is returned from server calls is null or holds only non-critical TVerificationResult items (see also Method 'EnsureNullOrOnlyNonCriticalVerificationResults' of the CommonNUnitFunctions Class for a convenient 'wrapper'!!!)
AVerificationResult | TVerificationResultCollection reference (can be null!). |
|
inlinestatic |
Examines a TVerificationResultCollection and returns true if one of the results has the specified error code
|
inlinestatic |
Calls the M:DataRow.SetColumnError(DataColumn, String) Method of a DataRow's Column to the TVerificationResult.ResultText Property of the passed in TVerificationResult.
AEventArgs | An instance of DataColumnChangeEventArgs. |
AVerificationResultEntry | TVerificationResult which has its TVerificationResult.ResultText Property set. |
AControlName | Name of the Control to which the TVerificationResult is related. |
AResetValue | Set this to true to retain the DataColumnChangeEventArgs.ProposedValue. |