C# Класс Castle.Components.Validator.AbstractValidator

Наследование: IValidator
Показать файл Открыть проект

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

Метод Описание
ApplyBrowserValidation ( BrowserValidationConfiguration config, InputElementType inputType, IBrowserValidationGenerator generator, IDictionary attributes, string target ) : void

Applies the browser validation by setting up one or more input rules on IBrowserValidationGenerator.

GetFieldOrPropertyValue ( object instance, string fieldOrPropertyName ) : object

Obtains the value of a property or field on a specific instance.

Initialize ( IValidatorRegistry validationRegistry, PropertyInfo property ) : void

Implementors should perform any initialization logic

IsValid ( object instance ) : bool

Implementors should perform the actual validation upon the property value

IsValid ( object instance, object fieldValue ) : bool

Implementors should perform the actual validation upon the property value

Защищенные методы

Метод Описание
BuildErrorMessage ( ) : string

Builds the error message.

GetString ( string key ) : string

Gets the string from resource

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

ApplyBrowserValidation() публичный Метод

Applies the browser validation by setting up one or more input rules on IBrowserValidationGenerator.
public ApplyBrowserValidation ( BrowserValidationConfiguration config, InputElementType inputType, IBrowserValidationGenerator generator, IDictionary attributes, string target ) : void
config BrowserValidationConfiguration The config.
inputType InputElementType Type of the input.
generator IBrowserValidationGenerator The generator.
attributes IDictionary The attributes.
target string The target.
Результат void

BuildErrorMessage() защищенный Метод

Builds the error message.
protected BuildErrorMessage ( ) : string
Результат string

GetFieldOrPropertyValue() публичный Метод

Obtains the value of a property or field on a specific instance.
public GetFieldOrPropertyValue ( object instance, string fieldOrPropertyName ) : object
instance object The instance to inspect.
fieldOrPropertyName string The name of the field or property to inspect.
Результат object

GetString() защищенный Метод

Gets the string from resource
protected GetString ( string key ) : string
key string The key.
Результат string

Initialize() публичный Метод

Implementors should perform any initialization logic
public Initialize ( IValidatorRegistry validationRegistry, PropertyInfo property ) : void
validationRegistry IValidatorRegistry
property System.Reflection.PropertyInfo The target property
Результат void

IsValid() публичный Метод

Implementors should perform the actual validation upon the property value
public IsValid ( object instance ) : bool
instance object The target type instance
Результат bool

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

Implementors should perform the actual validation upon the property value
public abstract IsValid ( object instance, object fieldValue ) : bool
instance object The target type instance
fieldValue object The property/field value. It can be null.
Результат bool