Base Business classes

Several base classes exists to fast track development of validatable classes.

ValidatableBase

Provides the basic validation functionality.
Key Members:
  • bool IsValid { get; } (Gets a bool indicating if the current state is valid.)
  • ICollection<string> ErrorMessages { get; } (Gets a ICollection of string that contain all the error messages.)

DataErrorInfoValidatableBase

Extends ValidatableBase to implement IDataErrorInfo which allows user interface binding to errors.
Key Members:
  • string Error { get; } (Gets an error message indicating what is wrong with this object.)
  • string this[string columnName] { get; } (Gets the error message for the property with the given name.)

NotifyValidatableBase

Extends DataErrorInfoValidatableBase to implement INotifyPropertyChanged which allows user a interface to react to property changing.
Key Members:
  • event PropertyChangedEventHandler PropertyChanged (Occurs when a property value changes.)

NotifyValidatableLinqBase

Provides a base class for Linq classes.
Implements IDataErrorInfo which allows user interface binding to errors.
Has the same members as ValidatableBase and DataErrorInfoValidatableBase

Last edited Mar 29, 2008 at 12:32 AM by SimonCropp, version 1

Comments

No comments yet.