This commit is contained in:
2025-09-05 20:16:58 +04:30
parent f46bb814cc
commit 9b75ddca8a
32 changed files with 660 additions and 125 deletions
@@ -2,11 +2,11 @@
namespace VizhTalk.BuildingBlocks.Domain;
public abstract class TypedIdValueBase<T> : IEquatable<TypedIdValueBase<T>>, ITypeIdValueBase
public abstract class TypeIdValueBase<T> : IEquatable<TypeIdValueBase<T>>, ITypeIdValueBase
{
public T Value { get; }
protected TypedIdValueBase(T value)
protected TypeIdValueBase(T value)
{
if (EqualityComparer<T>.Default.Equals(value, default(T)))
@@ -22,7 +22,7 @@ public abstract class TypedIdValueBase<T> : IEquatable<TypedIdValueBase<T>>, ITy
if (ReferenceEquals(null, obj))
return false;
return obj is TypedIdValueBase<T> other && Equals(other);
return obj is TypeIdValueBase<T> other && Equals(other);
}
public override int GetHashCode()
@@ -30,7 +30,7 @@ public abstract class TypedIdValueBase<T> : IEquatable<TypedIdValueBase<T>>, ITy
return Value!.GetHashCode();
}
public bool Equals(TypedIdValueBase<T>? other)
public bool Equals(TypeIdValueBase<T>? other)
{
if (other == null)
return false;
@@ -39,7 +39,7 @@ public abstract class TypedIdValueBase<T> : IEquatable<TypedIdValueBase<T>>, ITy
}
public static bool operator ==(TypedIdValueBase<T>? obj1, TypedIdValueBase<T>? obj2)
public static bool operator ==(TypeIdValueBase<T>? obj1, TypeIdValueBase<T>? obj2)
{
if (object.Equals(obj1, null))
{
@@ -54,7 +54,7 @@ public abstract class TypedIdValueBase<T> : IEquatable<TypedIdValueBase<T>>, ITy
return obj1.Equals(obj2);
}
public static bool operator !=(TypedIdValueBase<T>? x, TypedIdValueBase<T>? y)
public static bool operator !=(TypeIdValueBase<T>? x, TypeIdValueBase<T>? y)
{
return !(x == y);
}