C# Класс 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.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

Add() публичный статический Метод

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.
Результат void

ClearValidationError() публичный статический Метод

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.
Результат void

GetValidationErrors() публичный статический Метод

Gets the ValidationError in the given ICollection{IError}
public static GetValidationErrors ( this collection ) : IEnumerable
collection this The source collection.
Результат IEnumerable

MatchingErrorKey() публичный статический Метод

public static MatchingErrorKey ( this collection, string errorKey ) : IEnumerable
collection this
errorKey string
Результат IEnumerable

MatchingField() публичный статический Метод

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.
Результат IEnumerable