2023-02-24 12:59:56 +00:00
|
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
|
2023-03-08 12:20:33 +00:00
|
|
|
namespace InnovEnergy.App.Backend.Model;
|
2023-02-24 12:59:56 +00:00
|
|
|
|
|
|
|
public abstract partial class TreeNode
|
|
|
|
{
|
|
|
|
protected Boolean Equals(TreeNode other)
|
|
|
|
{
|
|
|
|
return Id == other.Id && ParentId == other.ParentId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public override Boolean Equals(Object? obj)
|
|
|
|
{
|
|
|
|
if (ReferenceEquals(null, obj)) return false;
|
|
|
|
if (ReferenceEquals(this, obj)) return true;
|
|
|
|
return obj.GetType() == GetType() && Equals((TreeNode)obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
[SuppressMessage("ReSharper", "NonReadonlyMemberInGetHashCode")]
|
|
|
|
public override Int32 GetHashCode()
|
|
|
|
{
|
|
|
|
return HashCode.Combine(Id, ParentId);
|
|
|
|
}
|
|
|
|
}
|