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

@ -107,5 +107,7 @@ namespace osu.Game.Database
// this matches realm's internal thread validation (see https://github.com/realm/realm-dotnet/blob/903b4d0b304f887e37e2d905384fb572a6496e70/Realm/Realm/Native/SynchronizationContextScheduler.cs#L72)
private bool isCorrectThread
=> (fetchedContext != null && SynchronizationContext.Current == fetchedContext) || fetchedThreadId == Thread.CurrentThread.ManagedThreadId;
public bool Equals(ILive<T>? other) => ID == other?.ID;
}
}