C# Class HMS.Model.Core.EntityBase

Inheritance: ISetProperty, IValidatableObject
Show file Open project: rashed94/RiteHMS

Public Methods

Method Description
AddValidationMethod ( string propertyName, Func method ) : void
EntityBase ( ) : System
GetErrors ( string propertyName ) : IEnumerable
SetProperty ( string propertyName, &backingField, newValue ) : void
Validate ( ValidationContext validationContext ) : IEnumerable

Protected Methods

Method Description
RaiseErrorsChanged ( string propertyName ) : void
RaisePropertyChanged ( string propertyName ) : void
RegisterValidationMethods ( ) : void

Registers a validation method for each property.

ResetProperties ( ) : void

Resets all properties to default values.

SetErrors ( string propertyName, IEnumerable errors ) : void

Private Methods

Method Description
ValidateProperty ( string propertyName, newValue ) : bool

Method Details

AddValidationMethod() public method

public AddValidationMethod ( string propertyName, Func method ) : void
propertyName string
method Func
return void

EntityBase() public method

public EntityBase ( ) : System
return System

GetErrors() public method

public GetErrors ( string propertyName ) : IEnumerable
propertyName string
return IEnumerable

RaiseErrorsChanged() protected method

protected RaiseErrorsChanged ( string propertyName ) : void
propertyName string
return void

RaisePropertyChanged() protected method

protected RaisePropertyChanged ( string propertyName ) : void
propertyName string
return void

RegisterValidationMethods() protected abstract method

Registers a validation method for each property.
protected abstract RegisterValidationMethods ( ) : void
return void

ResetProperties() protected abstract method

Resets all properties to default values.
protected abstract ResetProperties ( ) : void
return void

SetErrors() protected method

protected SetErrors ( string propertyName, IEnumerable errors ) : void
propertyName string
errors IEnumerable
return void

SetProperty() public method

public SetProperty ( string propertyName, &backingField, newValue ) : void
propertyName string
return void

Validate() public method

public Validate ( ValidationContext validationContext ) : IEnumerable
validationContext ValidationContext
return IEnumerable