Owneat Technical Guide main Help

Class ValueObject

Namespace: Common.Primitives
Assembly: Common.dll

Common.Primitives.ValueObject is a abstract class that define method relative to type of objects that are property of an entity without the need of being identifiable. Doesn't contain any Guid or ID as it isn't retrievable and shouldn't be retrievable as an entity.

public abstract class ValueObject

Inheritance

object ← ValueObject

Derived

Address, CategoryProductData

Inherited Members

object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.MemberwiseClone\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)

Methods

Equals\(object?\)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object?

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetCopy\(\)

public ValueObject? GetCopy()

Returns

ValueObject?

GetEqualityComponents\(\)

protected abstract IEnumerable<object> GetEqualityComponents()

Returns

IEnumerable < object \>

GetHashCode\(\)

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

NotEqualOperator\(ValueObject, ValueObject\)

protected static bool NotEqualOperator(ValueObject left, ValueObject right)

Parameters

left ValueObject

right ValueObject

Returns

bool

Last modified: 21 May 2024