refactor: removed the IComparable from IIdentifiable and implemented in extension method
This commit is contained in:
@@ -3,5 +3,10 @@ namespace Engine.Core;
|
||||
public static class IdentifiableExtensions
|
||||
{
|
||||
public static bool IsIdentical(this IIdentifiable? left, IIdentifiable? right)
|
||||
=> left?.CompareTo(right) == 0;
|
||||
{
|
||||
if (left == null || right == null)
|
||||
return false;
|
||||
|
||||
return left?.Id?.CompareTo(right?.Id) == 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user