C# Class EventManagerPro.Models.BaseModel

This class is used to provide functionality to each Model class without the need to replicate code.
Inheritance: INotifyPropertyChanged
Mostra file Open project: sagittaros/EventManagerModel

Protected Properties

Property Type Description
_errors List>.Dictionary

Public Methods

Method Description
AddError ( string propertyName, string error, bool isWarning ) : void

Adds the specified error to the errors collection if it is not already present.

NotifyPropertyChanged ( string propertyName ) : void
RemoveError ( string propertyName, string error ) : void

Removes the specified error from the errors collection if it is present.

Method Details

AddError() public method

Adds the specified error to the errors collection if it is not already present.
public AddError ( string propertyName, string error, bool isWarning ) : void
propertyName string Property name
error string Error message
isWarning bool Inserts error in the first position if false.
return void

NotifyPropertyChanged() public method

public NotifyPropertyChanged ( string propertyName ) : void
propertyName string
return void

RemoveError() public method

Removes the specified error from the errors collection if it is present.
public RemoveError ( string propertyName, string error ) : void
propertyName string Property name
error string Error message
return void

Property Details

_errors protected_oe property

protected Dictionary> _errors
return List>.Dictionary