C# Class Watchdog.Validation.Core.ClientUtil.ValidationCollectionExtensions

Extension method for an ICollection{T}. These can be used by users of Watchdog to assist with managing their collections of Errors on their viewmodel.
Afficher le fichier Open project: JDolinger/Watchdog

Méthodes publiques

Méthode Description
Add ( this collection, string errorKey, string message ) : void

Creates a ValidationError and adds it to the collection.

ClearValidationError ( this collection, string targetFieldKey ) : void

Clears all ValidationError for the named target field. This will not clear any ConversionError present. These should only be removed by WPF when it detects that a binding with a failed conversion has now been correct.

GetValidationErrors ( this collection ) : IEnumerable

Gets the ValidationError in the given ICollection{IError}

MatchingErrorKey ( this collection, string errorKey ) : IEnumerable
MatchingField ( this collection, string targetFieldKey ) : IEnumerable

Retrieves the IError matching the given field key.

Method Details

Add() public static méthode

Creates a ValidationError and adds it to the collection.
public static Add ( this collection, string errorKey, string message ) : void
collection this The target collection to add to.
errorKey string
message string The associated message.
Résultat void

ClearValidationError() public static méthode

Clears all ValidationError for the named target field. This will not clear any ConversionError present. These should only be removed by WPF when it detects that a binding with a failed conversion has now been correct.
public static ClearValidationError ( this collection, string targetFieldKey ) : void
collection this The source collection.
targetFieldKey string The field for which errors are being cleared.
Résultat void

GetValidationErrors() public static méthode

Gets the ValidationError in the given ICollection{IError}
public static GetValidationErrors ( this collection ) : IEnumerable
collection this The source collection.
Résultat IEnumerable

MatchingErrorKey() public static méthode

public static MatchingErrorKey ( this collection, string errorKey ) : IEnumerable
collection this
errorKey string
Résultat IEnumerable

MatchingField() public static méthode

Retrieves the IError matching the given field key.
public static MatchingField ( this collection, string targetFieldKey ) : IEnumerable
collection this The source collection.
targetFieldKey string The field for which errors are being search for.
Résultat IEnumerable