Skip to main content

Definition

Assembly: CloudNimble.EasyAF.Core.dll Namespace: CloudNimble.EasyAF.Core Inheritance: System.Object

Syntax

CloudNimble.EasyAF.Core.EasyObservableObject

Summary

A base class for objects to implement INotifyPropertyChanged. Provides strongly-typed property change notifications and automatic property setting with change detection.

Examples

public class Person : EasyObservableObject
{
    private string _name;
    private int _age;

    public string Name
    {
        get => _name;
        set => Set(nameof(Name), ref _name, value);
    }

    public int Age
    {
        get => _age;
        set => Set(() => Age, ref _age, value);
    }
}

Constructors

.ctor

Initializes a new instance of the EasyObservableObject class.

Syntax

public EasyObservableObject()

.ctor Inherited

Inherited from object

Syntax

public Object()

Methods

Clone

Creates a deep copy of the current object using JSON serialization.

Syntax

public T Clone<T>() where T : CloudNimble.EasyAF.Core.EasyObservableObject

Returns

Type: T A new instance of type T that is a deep copy of the current object.

Type Parameters

Exceptions

ExceptionDescription
JsonExceptionThrown when the object cannot be serialized or deserialized.

Dispose

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

Syntax

public void Dispose()

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?

Events

PropertyChanged

Occurs when a property value changes.

Syntax

public System.ComponentModel.PropertyChangedEventHandler PropertyChanged
  • System.ComponentModel.INotifyPropertyChanged
  • System.IDisposable