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
sstringThe string to clean.
Returns
Equals(BaseClass)
public bool Equals(BaseClass other)
Parameters
otherBaseClass
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
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
GetKnownNonDataProperty(string)
protected PropertyInfo GetKnownNonDataProperty(string name)
Parameters
namestring
Returns
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
storageTvalueTpropertyNamestring
Returns
Type Parameters
T
Events
PropertyChanged
Occurs when any properties are changed on this object.
public event PropertyChangedEventHandler PropertyChanged
Event Type
Operators
operator ==(BaseClass, BaseClass)
public static bool operator ==(BaseClass o1, BaseClass o2)
Parameters
Returns
operator !=(BaseClass, BaseClass)
public static bool operator !=(BaseClass o1, BaseClass o2)