Click or drag to resize

ObservableObjectBase Class

Base class implementing INotifyPropertyChanged.

Supports declarative dependencies specified by the PropertyDependencyAttribute and relaying events of other objects using the RelayedEventAttribute.

Inheritance Hierarchy

Namespace:  TomsToolbox.Desktop
Assembly:  TomsToolbox.Desktop (in TomsToolbox.Desktop.dll) Version: 1.0.70.0
Syntax
[SerializableAttribute]
public abstract class ObservableObjectBase : INotifyPropertyChanged, 
	IDataErrorInfo

The ObservableObjectBase type exposes the following members.

Constructors
  NameDescription
Protected methodObservableObjectBase
Initializes a new instance of the ObservableObjectBase class
Top
Methods
  NameDescription
Protected methodDetachEventSource
Detaches the event source.
Protected methodDetachEventSources
Detaches all event sources.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Overrides ObjectFinalize.)
Protected methodGetDataErrors
Gets the validation errors for a specified property or for the entire entity.

[NotNull, ItemNotNull]

Protected methodOnDataErrorsEvaluated
Called when data errors have been evaluated. Used e.g. to track data errors for each property.
Protected methodOnPropertyChanged(String)
Raises the PropertyChanged event for the property with the specified name.

[NotifyPropertyChangedInvocator]

Protected methodOnPropertyChangedT(ExpressionFuncT)
Raises the PropertyChanged event for the property identified by the specified property expression.

[NotifyPropertyChangedInvocator]

Protected methodRelayEventsOf(INotifyPropertyChanged)
Relays the property changed events of the source object. The properties to relay must be declared with the RelayedEventAttribute.
Protected methodRelayEventsOf(INotifyPropertyChanged, INotifyPropertyChanged)
Relays the property changed events of the source object (if not null) and detaches the old source (if not null).
Protected methodSetPropertyT(T, T, ExpressionFuncT)
Sets the property and raises the PropertyChanged event for the property identified by the specified property expression.

[NotifyPropertyChangedInvocator]

Protected methodSetPropertyT(T, T, String)
Sets the property and raises the PropertyChanged event for the property identified by the specified property expression.

[NotifyPropertyChangedInvocator]

Protected methodSetPropertyT(T, T, ActionT, T, String)
Sets the property and raises the PropertyChanged event for the property identified by the specified property expression.

[NotifyPropertyChangedInvocator]

Protected methodSetPropertyT(T, T, ExpressionFuncT, ActionT, T)
Sets the property and raises the PropertyChanged event for the property identified by the specified property expression.

[NotifyPropertyChangedInvocator]

Protected methodSetPropertyT(T, T, String, ActionT, T)
Sets the property and raises the PropertyChanged event for the property identified by the specified property expression.

[NotifyPropertyChangedInvocator]

Top
Events
  NameDescription
Public eventPropertyChanged
Occurs when a property value changes.
Top
Extension Methods
  NameDescription
Public Extension MethodSafeCastT
Performs a cast from object to T, avoiding possible null violations if T is a value type.

[CanBeNull]

(Defined by ObjectExtensions.)
Top
Remarks
Also implements IDataErrorInfo (and INotifyDataErrorInfo in .Net4.5++) to support validation. The default implementation examines ValidationAttribute on the affected properties to retrieve error information.
See Also