OpenPetra
Free Administration Software for Non-Profits
|
A TVerificationResultCollection object stores any number of TVerificationResult objects. With this typed Collection it is for instance possible to perform several data verification steps on the Server and pass the results back to the Client in one object. More...
Public Member Functions | |
TVerificationResultCollection (SerializationInfo info, StreamingContext ctxt) | |
Deserialization constructor. More... | |
virtual void | GetObjectData (SerializationInfo info, StreamingContext ctxt) |
Serialization function. More... | |
TVerificationResultCollection () | |
constructor More... | |
TVerificationResultCollection (TVerificationResultCollection ACollection) | |
copy constructor More... | |
TVerificationResultCollection (System.Guid ACurrentDataValidationRunID) | |
constructor More... | |
IEnumerator | GetEnumerator () |
get an enumerator More... | |
void | Clear () |
clear all items from the list More... | |
int | Add (IResultInterface value) |
Adds a new verification object. More... | |
int | AddAndIgnoreNullValue (IResultInterface value) |
Adds a new verification object. Should the verification object be null, nothing happens. More... | |
void | AddCollection (TVerificationResultCollection value) |
merge another verification collection into the current collection More... | |
void | BuildScreenVerificationResultList (out String AErrorMessages, out object AFirstErrorContext, Type ARestrictToTypeWhichRaisesError=null, bool AIgnoreWarnings=false) |
Generates text for a MessageBox showing all verification errors that are held in the TVerificationResultCollection (optionally excluding some if the ARestrictToTypeWhichRaisesError Argument is not null). More... | |
void | BuildScreenVerificationResultList (object AResultContext, out String AErrorMessages) |
generate the text for a message box showing all verification errors of a given context More... | |
string | BuildVerificationResultString () |
Returns a formatted String that contains information about all TVerificationResults in the TVerificationResultCollection. More... | |
string | GetErrorCodes () |
Return all errors with their codes, for the javascript client, formatted with json. More... | |
bool | Contains (IResultInterface value) |
check if the Verification list contains this value already More... | |
bool | Contains (object AResultContext) |
check if the verification list already contains a message from the given context More... | |
bool | Contains (DataColumn AResultColumn) |
Checks if there is an error for this data column already. More... | |
bool | Contains (DataTable ADataTable) |
Checks if there is an error for any data column of this DataTable already. More... | |
bool | AddOrRemove (TVerificationResult AVerificationResult, DataColumn AResultColumn, object AResultContext=null) |
Adds a TVerificationResult for a System.Data.DataColumn specified with AResultColumn , or removes a TVerificationResult that is stored in the collection for the System.Data.DataColumn specified with AResultColumn . If AVerificationResult isn't null, this Method will add it, if AVerificationResult is null, this Method will remove all entries in the TVerificationResultCollection that are recorded for AResultColumn . More... | |
bool | Auto_Add_Or_AddOrRemove (object AContext, TVerificationResult AVerificationResult) |
Calls the Add Method. More... | |
IResultInterface | GetVerificationResult (int Index) |
access result by index More... | |
void | SetVerificationResult (int Index, IResultInterface Value) |
assign a specified verification result in the list More... | |
int | IndexOf (IResultInterface value) |
find the index of the given value More... | |
void | Insert (int index, IResultInterface value) |
insert a new value at the given position More... | |
void | RemoveAt (int index) |
remove the value at the given position More... | |
TScreenVerificationResult | FindBy (DataColumn AResultColumn) |
Find a TScreenVerificationResult by ResultColumn. More... | |
List< TScreenVerificationResult > | FindAllBy (DataColumn AResultColumn) |
Finds all TScreenVerificationResults that are stored for a certain ResultColumn. More... | |
List< TScreenVerificationResult > | FindAllBy (DataTable ADataTable) |
Finds all TScreenVerificationResults that are stored for any data column of this DataTable already. More... | |
IResultInterface | FindBy (object AResultContext) |
Find a TScreenVerificationResult by ResultContext More... | |
IResultInterface | FindBy (int index) |
Returns the TScreenVerificationResult that is found at the index position. More... | |
void | Remove (IResultInterface value) |
remove a result from the list More... | |
void | Remove (DataColumn AResultColumn) |
remove a result from the list, specified by the column More... | |
void | Remove (String AResultColumnName) |
remove a result identified by the column name More... | |
void | Remove (object AResultContext) |
remove a result identified by the context More... | |
void | RecordNewDataValidationRun () |
Records a new Data Validation Run. All TVerificationResults/TScreenVerificationResults that are created during this 'run' are associated with this 'run' through a unique System.Guid. More... | |
Static Public Member Functions | |
static void | DowngradeScreenVerificationResults (TVerificationResultCollection AScreenVerificationResults) |
Downgrades all TScreenVerificationResult items in a TVerificationResultCollection to TVerificationResult items. More... | |
Properties | |
IResultInterface | this[int index] [get, set] |
access the elements of the verification collection More... | |
Int32 | CountCriticalErrors [get] |
Use this instead of Count if you don't want non-critical errors to be counted. More... | |
bool | HasCriticalErrors [get] |
Checks whether there are any TVerificationResults in the collection that denote a critical error. More... | |
bool | HasCriticalOrNonCriticalErrors [get] |
Checks whether there are any TVerificationResults in the collection that denote a critical or non-critical error. More... | |
bool | HasOnlyNonCriticalErrors [get] |
Checks whether there is at least one TVerificationResult in the collection and, if so, that it is /they are all non-critical. More... | |
System.Guid | CurrentDataValidationRunID [get] |
Data Validation Run ID that this instance is associated with. More... | |
int | Count [get] |
the number of verification objects More... | |
A TVerificationResultCollection object stores any number of TVerificationResult objects. With this typed Collection it is for instance possible to perform several data verification steps on the Server and pass the results back to the Client in one object.
NOTES on C# conversion: (1) The 'Item' method overloads have been renamed to 'FindBy' method overloads (couldn't do that as in Delphi.NET!); (2) The 'VerificationResultInfo' Indexed Property that we had in .NET has now become the Default Indexed Property of this Class because C# doesn't allow named Indexed Properties!
|
inline |
Deserialization constructor.
|
inline |
constructor
|
inline |
copy constructor
|
inline |
constructor
|
inline |
Adds a new verification object.
value | the verification object to be added (must not be null) |
|
inline |
Adds a new verification object. Should the verification object be null, nothing happens.
value | the verification object to be added (can be null) |
|
inline |
merge another verification collection into the current collection
value | collection to be merged |
|
inline |
Adds a TVerificationResult for a System.Data.DataColumn specified with AResultColumn , or removes a TVerificationResult that is stored in the collection for the System.Data.DataColumn specified with AResultColumn . If AVerificationResult isn't null, this Method will add it, if AVerificationResult is null, this Method will remove all entries in the TVerificationResultCollection that are recorded for AResultColumn .
When adding a TVerificationResult, a check is done if a TVerificationResult with exactly the same Property values is already stored. If this is the case, the TVerificationResult is not added a second time.
AVerificationResult | The TVerificationResult to add, or null if a TVerificationResult that is stored in the collection for the System.Data.DataColumn AResultColumn should get removed. |
AResultColumn | The System.Data.DataColumn to check for. |
AResultContext | Considered only when AVerificationResult is null: removal from collection will only happen if AResultContext .ToString() matches an TVerificationResult's ResultContext.ToString() that is stored in the collection for the System.Data.DataColumn. (Default: null.) |
|
inline |
Calls the Add Method.
AContext | Context that describes where the data verification failed. |
AVerificationResult | An instance of TVerificationResult that is to be added/to be added or removed from the TVerificationResultCollection. |
|
inline |
generate the text for a message box showing all verification errors of a given context
This method ignores non-screen verification results and builds the list from screen verification results only.
AResultContext | only show errors of the given context |
AErrorMessages | will have the list of error messages |
|
inline |
Generates text for a MessageBox showing all verification errors that are held in the TVerificationResultCollection (optionally excluding some if the ARestrictToTypeWhichRaisesError Argument is not null).
AErrorMessages | String containing a formatted list of error messages that is taken from the TVerificationResultCollection. |
AFirstErrorContext | TVerificationResult.ResultContext of the first error. |
ARestrictToTypeWhichRaisesError | Restricts the TVerificationResults that are added to the result list to those whose TVerificationResult.ResultContext matches ARestrictToTypeWhichRaisesError (defaults to null). |
AIgnoreWarnings | Set to true if Warnings are to be ignored (defaults to false). |
|
inline |
Returns a formatted String that contains information about all TVerificationResults in the TVerificationResultCollection.
|
inline |
clear all items from the list
|
inline |
Checks if there is an error for this data column already.
This method checks screen verification results only, since a simple verification result is not associated with a Result Column.
AResultColumn | The System.Data.DataColumn to check for. |
|
inline |
Checks if there is an error for any data column of this DataTable already.
This method checks screen verification results only, since a simple verification result is not associated with a Result Column table.
ADataTable | The System.Data.DataTable to check for. |
|
inline |
check if the Verification list contains this value already
value | check list for this value |
|
inline |
check if the verification list already contains a message from the given context
AResultContext | check list for this value |
true if the value is already there
true if an error from this context is already there
|
inlinestatic |
Downgrades all TScreenVerificationResult items in a TVerificationResultCollection to TVerificationResult items.
AScreenVerificationResults | A TVerificationResultCollection holding exclusively TScreenVerificationResult items. |
|
inline |
Finds all TScreenVerificationResults that are stored for a certain ResultColumn.
This method checks screen verification results only, since a simple verification result is not associated with a Result Column.
AResultColumn | ResultColumn to look for. |
|
inline |
Finds all TScreenVerificationResults that are stored for any data column of this DataTable already.
This method checks screen verification results only, since a simple verification result is not associated with a Result Column table.
ADataTable | The System.Data.DataTable to check for. |
|
inline |
Find a TScreenVerificationResult by ResultColumn.
This method checks screen verification results only, since a simple verification result is not associated with a Result Column.
AResultColumn | ResultColumn to look for. |
|
inline |
Returns the TScreenVerificationResult that is found at the index position.
index | Tndex to identify the TScreenVerificationResult. |
|
inline |
Find a TScreenVerificationResult by ResultContext
AResultContext | context to look for |
|
inline |
get an enumerator
|
inline |
Return all errors with their codes, for the javascript client, formatted with json.
|
inlinevirtual |
Serialization function.
|
inline |
access result by index
Index | which result should be returned |
|
inline |
find the index of the given value
value | value to look for |
|
inline |
insert a new value at the given position
index | position to insert after |
value | value to add |
|
inline |
Records a new Data Validation Run. All TVerificationResults/TScreenVerificationResults that are created during this 'run' are associated with this 'run' through a unique System.Guid.
|
inline |
remove a result from the list, specified by the column
AResultColumn | the column identifying the result |
|
inline |
remove a result from the list
value | value to delete |
|
inline |
remove a result identified by the context
AResultContext | the context |
|
inline |
remove a result identified by the column name
This method checks screen verification results only, since a simple verification result is not associated with a Result Column.
AResultColumnName | column name |
|
inline |
remove the value at the given position
|
inline |
assign a specified verification result in the list
Index | index to change the verification result |
Value | the new value |
|
get |
the number of verification objects
|
get |
Use this instead of Count if you don't want non-critical errors to be counted.
|
get |
Data Validation Run ID that this instance is associated with.
|
get |
Checks whether there are any TVerificationResults in the collection that denote a critical error.
Prefer using Method TVerificationHelper.IsNullOrOnlyNonCritical over the use of this Method as using the latter takes care of a null check on the TVerificationResultCollection to guard against a NullReferenceException in case the TVerificationResultCollection is null.
This Method does not check/count any TVerificationResult instances whose TVerificationResult.ResultSeverity is TResultSeverity.Resv_Noncritical or TResultSeverity.Resv_Info
.
|
get |
Checks whether there are any TVerificationResults in the collection that denote a critical or non-critical error.
Does not check/count any TVerificationResult whose TVerificationResult.ResultSeverity is TResultSeverity.Resv_Info
.
|
get |
Checks whether there is at least one TVerificationResult in the collection and, if so, that it is /they are all non-critical.
Returns false if any TVerificationResult is not TResultSeverity.Resv_Info. Also returns false if there are no TVerificationResults at all. Returns true otherwise.
.
|
getset |
access the elements of the verification collection