Microscopic Traffic Simulator
Microscopic_Traffic_Simulator.ViewModels.ViewModelBase Class Reference
Inheritance diagram for Microscopic_Traffic_Simulator.ViewModels.ViewModelBase:
Microscopic_Traffic_Simulator.ViewModels.CanvasViewModel Microscopic_Traffic_Simulator.ViewModels.ClosableViewModel Microscopic_Traffic_Simulator.ViewModels.ConstructionViewModel Microscopic_Traffic_Simulator.ViewModels.MainViewModel Microscopic_Traffic_Simulator.ViewModels.ParametersViewModel Microscopic_Traffic_Simulator.ViewModels.SimulationControlViewModel

Public Member Functions

void VerifyPropertyName (string propertyName)
 Warns the developer if this object does not have a public property with the specified name. This method does not exist in a Release build. More...
 
void Dispose ()
 Invoked when this object is being removed from the application and will be subject to garbage collection. More...
 

Protected Member Functions

 ViewModelBase ()
 Create viewmodel base. More...
 
virtual void OnPropertyChanged (string propertyName)
 Raises this object's PropertyChanged event. More...
 
virtual void OnDispose ()
 Child classes can override this method to perform clean-up logic, such as removing event handlers. More...
 

Protected Attributes

Messenger messenger
 Instance of messenger for communicating between view models. More...
 

Properties

virtual bool ThrowOnInvalidPropertyName [get]
 Returns whether an exception is thrown, or if a Debug.Fail() is used when an invalid property name is passed to the VerifyPropertyName method. The default value is false, but subclasses used by unit tests might override this property's getter to return true. More...
 

Events

PropertyChangedEventHandler PropertyChanged
 Raised when a property on this object has a new value. More...
 

Detailed Description

Definition at line 8 of file ViewModelBase.cs.

Constructor & Destructor Documentation

Microscopic_Traffic_Simulator.ViewModels.ViewModelBase.ViewModelBase ( )
protected

Create viewmodel base.

Definition at line 18 of file ViewModelBase.cs.

Member Function Documentation

void Microscopic_Traffic_Simulator.ViewModels.ViewModelBase.Dispose ( )

Invoked when this object is being removed from the application and will be subject to garbage collection.

Definition at line 75 of file ViewModelBase.cs.

virtual void Microscopic_Traffic_Simulator.ViewModels.ViewModelBase.OnDispose ( )
protectedvirtual

Child classes can override this method to perform clean-up logic, such as removing event handlers.

Definition at line 84 of file ViewModelBase.cs.

virtual void Microscopic_Traffic_Simulator.ViewModels.ViewModelBase.OnPropertyChanged ( string  propertyName)
protectedvirtual

Raises this object's PropertyChanged event.

The property that has a new value.

Definition at line 59 of file ViewModelBase.cs.

void Microscopic_Traffic_Simulator.ViewModels.ViewModelBase.VerifyPropertyName ( string  propertyName)

Warns the developer if this object does not have a public property with the specified name. This method does not exist in a Release build.

Definition at line 27 of file ViewModelBase.cs.

Member Data Documentation

Messenger Microscopic_Traffic_Simulator.ViewModels.ViewModelBase.messenger
protected

Instance of messenger for communicating between view models.

Definition at line 13 of file ViewModelBase.cs.

Property Documentation

virtual bool Microscopic_Traffic_Simulator.ViewModels.ViewModelBase.ThrowOnInvalidPropertyName
getprotected

Returns whether an exception is thrown, or if a Debug.Fail() is used when an invalid property name is passed to the VerifyPropertyName method. The default value is false, but subclasses used by unit tests might override this property's getter to return true.

Definition at line 48 of file ViewModelBase.cs.

Event Documentation

PropertyChangedEventHandler Microscopic_Traffic_Simulator.ViewModels.ViewModelBase.PropertyChanged

Raised when a property on this object has a new value.

Definition at line 53 of file ViewModelBase.cs.


The documentation for this class was generated from the following file: