C# Класс Tortuga.Anchor.Modeling.Internals.AbstractModelBase

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

Private Properties

Свойство Тип Описание
Initialize void
InvokePropertyChanged void
OnErrorsChanged void
_ModelBase_OnDeserializing void

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

Метод Описание
AddHandler ( IListener eventHandler ) : void

Adds a weak event handler.

ClearErrors ( ) : void

Clears the error collections and the HasErrors property

GetAllErrors ( ) : ReadOnlyCollection

Returns a collection of all errors (object and property level).

Call Validate() to refresh this property.

GetErrors ( ) : ReadOnlyCollection

Returns a collection of object-level errors.

Call Validate() to refresh this property.

GetErrors ( string propertyName ) : ReadOnlyCollection

Returns a collection of property-level errors.

Call Validate() to refresh this property.

RemoveHandler ( IListener eventHandler ) : void

Removes a weak event handler.

Validate ( ) : bool

This forces the object to be completely revalidated.

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

Метод Описание
AbstractModelBase ( ) : System

Initializes a new instance of the AbstractModelBase class.

OnErrorsChanged ( string propertyName ) : void

Used to manually invoke the ErrorsChanged event.

OnValidateObject ( ValidationResultCollection results ) : void

Override this method to add imperative validation at the object level.

OnValidateProperty ( string propertyName, ValidationResultCollection results ) : void

Override this method to add imperative validation at the property level.

Приватные методы

Метод Описание
Initialize ( ) : void
InvokePropertyChanged ( PropertyChangedEventArgs e ) : void

Triggers the PropertyChanged event.

OnErrorsChanged ( string propertyName, ErrorsDictionaryUpdateType updateType ) : void

Invoke this method to signal the events associated with changing the errors dictionary. The parameter updateType is returned by the methods on ErrorsDictionary.

_ModelBase_OnDeserializing ( StreamingContext context ) : void

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

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

Initializes a new instance of the AbstractModelBase class.
protected AbstractModelBase ( ) : System
Результат System

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

Adds a weak event handler.
eventHandler;eventHandler is null.
public AddHandler ( IListener eventHandler ) : void
eventHandler IListener
Результат void

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

Clears the error collections and the HasErrors property
public ClearErrors ( ) : void
Результат void

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

Returns a collection of all errors (object and property level).
Call Validate() to refresh this property.
public GetAllErrors ( ) : ReadOnlyCollection
Результат ReadOnlyCollection

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

Returns a collection of object-level errors.
Call Validate() to refresh this property.
public GetErrors ( ) : ReadOnlyCollection
Результат ReadOnlyCollection

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

Returns a collection of property-level errors.
Call Validate() to refresh this property.
public GetErrors ( string propertyName ) : ReadOnlyCollection
propertyName string Null or String.Empty will return the object-level errors
Результат ReadOnlyCollection

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

Used to manually invoke the ErrorsChanged event.
protected OnErrorsChanged ( string propertyName ) : void
propertyName string Name of the property.
Результат void

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

Override this method to add imperative validation at the object level.
protected OnValidateObject ( ValidationResultCollection results ) : void
results ValidationResultCollection A collection of the declarative validation errors. You may add and remove errors from this collection.
Результат void

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

Override this method to add imperative validation at the property level.
protected OnValidateProperty ( string propertyName, ValidationResultCollection results ) : void
propertyName string The name of the property being validated.
results ValidationResultCollection A collection of the declarative validation errors. You may add and remove errors from this collection.
Результат void

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

Removes a weak event handler.
eventHandler;eventHandler is null.
public RemoveHandler ( IListener eventHandler ) : void
eventHandler IListener
Результат void

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

This forces the object to be completely revalidated.
public abstract Validate ( ) : bool
Результат bool