C# Class Open.Core.ModelBase

Base class for data models.
Inheritance: DisposableBase, IModel, INotifyPropertyChanged, IDisposable, INotifyDisposed
Mostrar archivo Open project: philcockfield/Open.TestHarness.SL

Private Properties

Property Type Description
GetPropertyRefFromList PropertyRef

Public Methods

Method Description
GetPropertyRef ( string propertyName ) : PropertyRef

Retrieves a singleton instance to the handle to the named property.

ToJson ( ) : string

Serializes the model to JSON.

Protected Methods

Method Description
FirePropertyChanged ( string propertyName ) : void

Fires the 'PropertyChanged' event.

Get ( string propertyName, object defaultValue ) : object

Retrieves a property value from the backing store.

OnDisposed ( ) : void
Set ( string propertyName, object value, object defaultValue ) : bool

Stores the given value for the named property (firing the 'PropertyChanged' event if the value differs from the current value).

Private Methods

Method Description
GetPropertyRefFromList ( string propertyName ) : PropertyRef

Method Details

FirePropertyChanged() protected method

Fires the 'PropertyChanged' event.
protected FirePropertyChanged ( string propertyName ) : void
propertyName string The name of the property that has changed.
return void

Get() protected method

Retrieves a property value from the backing store.
protected Get ( string propertyName, object defaultValue ) : object
propertyName string The name of the property.
defaultValue object The default value to provide (if the value does not exist).
return object

GetPropertyRef() public method

Retrieves a singleton instance to the handle to the named property.
public GetPropertyRef ( string propertyName ) : PropertyRef
propertyName string The name of the property to retrieve.
return PropertyRef

OnDisposed() protected method

protected OnDisposed ( ) : void
return void

Set() protected method

Stores the given value for the named property (firing the 'PropertyChanged' event if the value differs from the current value).
protected Set ( string propertyName, object value, object defaultValue ) : bool
propertyName string The name of the property.
value object The value to set.
defaultValue object The default value of the property.
return bool

ToJson() public method

Serializes the model to JSON.
public ToJson ( ) : string
return string