Table of Contents

Class BaseClass

Namespace
FatturaElettronica.Core
Assembly
FatturaElettronica.dll

The class all domain objects must inherit from.

Currently supports:

  • IEquatable so you can easily compare complex BusinessObjects togheter.
  • Binding (INotififyPropertyChanged and IDataErrorInfo).

TODO:

  • BeginEdit()/EndEdit() combination, and rollbacks for cancels (IEditableObject).
public abstract class BaseClass : INotifyPropertyChanged, IEquatable<BaseClass>
Inheritance
BaseClass
Implements
Derived
Inherited Members

Methods

CleanString(string)

Cleans a string by ensuring it isn't null and trimming it.

protected string CleanString(string s)

Parameters

s string

The string to clean.

Returns

string

Equals(BaseClass)

public bool Equals(BaseClass other)

Parameters

other BaseClass

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetAllDataProperties()

Provides a list of actual data properties for the current BusinessObject instance, sorted by writing order.

protected IEnumerable<PropertyInfo> GetAllDataProperties()

Returns

IEnumerable<PropertyInfo>

A enumerable list of PropertyInfo instances.

Remarks

Only properties flagged with the OrderedDataProperty attribute will be returned.

GetHashCode()

public override int GetHashCode()

Returns

int

GetKnownNonDataProperty(string)

protected PropertyInfo GetKnownNonDataProperty(string name)

Parameters

name string

Returns

PropertyInfo

IsEmpty()

Checks wether a BusinessObject instance is empty.

public virtual bool IsEmpty()

Returns

bool

Returns true if the object is empty; false otherwise.

SetProperty<T>(ref T, T, string)

protected bool SetProperty<T>(ref T storage, T value, string propertyName = null)

Parameters

storage T
value T
propertyName string

Returns

bool

Type Parameters

T

Events

PropertyChanged

Occurs when any properties are changed on this object.

public event PropertyChangedEventHandler PropertyChanged

Event Type

PropertyChangedEventHandler

Operators

operator ==(BaseClass, BaseClass)

public static bool operator ==(BaseClass o1, BaseClass o2)

Parameters

o1 BaseClass
o2 BaseClass

Returns

bool

operator !=(BaseClass, BaseClass)

public static bool operator !=(BaseClass o1, BaseClass o2)

Parameters

o1 BaseClass
o2 BaseClass

Returns

bool