Show / Hide Table of Contents

Class ValueObject

Provides a base class for a value object.

Inheritance
Object
ValueObject
Telefon
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Object.MemberwiseClone()
Namespace: IRM.Domain
Assembly: IRM.dll
Syntax
[Serializable]
public abstract class ValueObject

Methods

EqualOperator(ValueObject, ValueObject)

Helper function for implementing overloaded equality operator.

Declaration
protected static bool EqualOperator(ValueObject left, ValueObject right)
Parameters
ValueObject left

Left-hand side object.

ValueObject right

Right-hand side object.

Returns
Boolean

Equals(ValueObject)

Compares two Value Objects according to atomic values returned by GetAtomicValues().

Declaration
public virtual bool Equals(ValueObject obj)
Parameters
ValueObject obj

ValueObject to compare to.

Returns
Boolean

true if objects are considered equal; otherwise false.

Equals(Object)

Compares two Value Objects according to atomic values returned by GetAtomicValues().

Declaration
public override bool Equals(object obj)
Parameters
Object obj

Object to compare to.

Returns
Boolean

true if objects are considered equal; otherwise false.

Overrides
Object.Equals(Object)

GetAtomicValues()

To be overridden in inheriting clesses for providing a collection of atomic values of this Value Object.

Declaration
protected abstract IEnumerable<object> GetAtomicValues()
Returns
IEnumerable<Object>

Collection of atomic values.

GetHashCode()

Returns hashcode value calculated according to a collection of atomic values returned by GetAtomicValues().

Declaration
public override int GetHashCode()
Returns
System.Int32

Hashcode value.

Overrides
System.Object.GetHashCode()

NotEqualOperator(ValueObject, ValueObject)

Helper function for implementing overloaded inequality operator.

Declaration
protected static bool NotEqualOperator(ValueObject left, ValueObject right)
Parameters
ValueObject left

Left-hand side object.

ValueObject right

Right-hand side object.

Returns
Boolean

Extension Methods

ObjectExtensions.DeepClone<T>(T)
AnnotationsExtensions.IsValid(Object)
Back to top Generated by DocFX