Add equality support to ILive types

This commit is contained in:
Dean Herbert
2021-11-26 14:38:39 +09:00
parent 3bc8f21935
commit 13612c0d02
5 changed files with 13 additions and 7 deletions

View File

@ -3,6 +3,8 @@
using System;
#nullable enable
namespace osu.Game.Database
{
public class EntityFrameworkLive<T> : ILive<T> where T : class
@ -30,5 +32,7 @@ namespace osu.Game.Database
}
public T Value { get; }
public bool Equals(ILive<T>? other) => ID == other?.ID;
}
}