Generated by DocFX

Class ObservableClass

Class ObservableClass. Implements the IObservableClass

Inheritance
System.Object
ObservableClass
Automation
AutomationModel
BaseState
EventState
TimeState
ModelBase
TreeNode<TKey, TModel>
Style
ViewModel
Implements
IObservableClass
IBindable
INotifyPropertyChanged
IDisposable
IDataErrorInfo
INotifyDataErrorInfo
Namespace: ISynergy.Framework.Core.Base
Assembly: ISynergy.Framework.Core.dll
Syntax
public abstract class ObservableClass : object, IObservableClass, IBindable

Constructors

View Source

ObservableClass(Boolean)

Initializes a new instance of the ObservableClass class.

Declaration
protected ObservableClass(bool automaticValidationTrigger = false)
Parameters
Type Name Description
System.Boolean automaticValidationTrigger

The validation.

Properties

View Source

AutomaticValidationTrigger

Automatic validation trigger.

Declaration
public bool AutomaticValidationTrigger { get; set; }
Property Value
Type Description
System.Boolean
View Source

Error

Declaration
public string Error { get; }
Property Value
Type Description
System.String
View Source

Errors

Declaration
public ObservableCollection<KeyValuePair<string, string>> Errors { get; }
Property Value
Type Description
ObservableCollection<KeyValuePair<System.String, System.String>>
View Source

HasErrors

Declaration
public bool HasErrors { get; }
Property Value
Type Description
System.Boolean
View Source

IsDirty

Gets a value indicating whether this instance is dirty.

Declaration
public bool IsDirty { get; }
Property Value
Type Description
System.Boolean

true if this instance is dirty; otherwise, false.

View Source

IsValid

Returns true if ... is valid.

Declaration
public bool IsValid { get; }
Property Value
Type Description
System.Boolean

true if this instance is valid; otherwise, false.

View Source

Item[String]

Declaration
public string this[string propertyName] { get; }
Parameters
Type Name Description
System.String propertyName
Property Value
Type Description
System.String
View Source

Properties

Gets the properties.

Declaration
public Dictionary<string, IProperty> Properties { get; }
Property Value
Type Description
Dictionary<System.String, IProperty>

The properties.

View Source

Validator

Gets or sets the validator.

Declaration
public Action<IObservableClass> Validator { get; set; }
Property Value
Type Description
Action<IObservableClass>

The validator.

Methods

View Source

AddValidationError(String, String)

Declaration
public void AddValidationError(string propertyName, string errorMessage)
Parameters
Type Name Description
System.String propertyName
System.String errorMessage
View Source

ClearErrors()

Clears the errors.

Declaration
public bool ClearErrors()
Returns
Type Description
System.Boolean

true if XXXX, false otherwise.

View Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()
View Source

Dispose(Boolean)

Releases unmanaged and - optionally - managed resources.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources.

View Source

Equals(Object)

Checks if both objects are the same based on common identity property.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The object to compare with the current object.

Returns
Type Description
System.Boolean

true if the specified is equal to this instance; otherwise, false.

View Source

GetErrors(String)

Declaration
public IEnumerable GetErrors(string propertyName)
Parameters
Type Name Description
System.String propertyName
Returns
Type Description
IEnumerable
View Source

GetHashCode()

Returns a hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

View Source

GetValue<T>(String)

Gets the value.

Declaration
protected T GetValue<T>(string propertyName = null)
Parameters
Type Name Description
System.String propertyName

Name of the property.

Returns
Type Description
T

T.

Type Parameters
Name Description
T
View Source

MarkAsClean()

Marks as clean.

Declaration
public void MarkAsClean()
View Source

OnErrorsChanged(String)

Declaration
public virtual void OnErrorsChanged(string propertyName = null)
Parameters
Type Name Description
System.String propertyName
View Source

OnPropertyChanged(String)

Called when [property changed].

Declaration
public virtual void OnPropertyChanged(string propertyName = null)
Parameters
Type Name Description
System.String propertyName

Name of the property.

View Source

Revert()

Reverts this instance.

Declaration
public void Revert()
View Source

SetValue<T>(T, String)

Sets the value.

Declaration
protected void SetValue<T>(T value, string propertyName = null)
Parameters
Type Name Description
T value

The value.

System.String propertyName

Name of the property.

Type Parameters
Name Description
T
View Source

SetValue<T>(ref T, T, String)

Sets the value.

Declaration
protected void SetValue<T>(ref T field, T value, string propertyName = null)
Parameters
Type Name Description
T field

The field.

T value

The value.

System.String propertyName

Name of the property.

Type Parameters
Name Description
T
View Source

Validate(Boolean)

Validates this instance.

Declaration
public bool Validate(bool validateUnderlayingProperties = true)
Parameters
Type Name Description
System.Boolean validateUnderlayingProperties
Returns
Type Description
System.Boolean

true if XXXX, false otherwise.

Events

View Source

ErrorsChanged

Declaration
public event EventHandler<DataErrorsChangedEventArgs> ErrorsChanged
Event Type
Type Description
EventHandler<DataErrorsChangedEventArgs>
View Source

PropertyChanged

Occurs when a property value changes.

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type Description
PropertyChangedEventHandler

Implements

IObservableClass
IBindable
INotifyPropertyChanged
IDisposable
IDataErrorInfo
INotifyDataErrorInfo

Extension Methods

Matrix.Replace<T>(T, Object, Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)
EntityBaseExtensions.HasProperty(Object, String)
ArrayExtensions.Concatenate<T>(T, T[])
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>)
ObjectExtensions.Clone<T>(T)
ObjectExtensions.To<T>(Object)
ObjectExtensions.To(Object, Type)
ObjectExtensions.HasMethod(Object, String)
ObjectExtensions.AddressOf<T>(T)
ReflectionExtensions.GetIdentityValue<T>(T)
ReflectionExtensions.GetIdentityValue<T, TResult>(T)
ReflectionExtensions.GetIdentityProperty<T>(T)
ReflectionExtensions.HasIdentityProperty<T>(T)
ReflectionExtensions.GetPropertyValue<T, TResult>(T, String, TResult)
ReflectionExtensions.GetPropertyInfo<T, TValue>(T, Expression<Func<T, TValue>>)
ReflectionExtensions.GetTitleValue<T>(T)
ReflectionExtensions.HasParentIdentityProperty<T>(T)
ReflectionExtensions.GetParentIdentityProperty<T>(T)
ReflectionExtensions.IsFreeApplication<T>(T)

See Also

IObservableClass