Use HashSets for increased perf

This commit is contained in:
Bond_009
2019-02-08 22:59:28 +01:00
committed by Bond-009
parent eb4b705167
commit 64d5ec12e2
6 changed files with 128 additions and 130 deletions

View File

@@ -171,9 +171,9 @@ namespace Emby.Server.Implementations.Library
/// <exception cref="ArgumentNullException"></exception>
public User GetUserById(Guid id)
{
if (id.Equals(Guid.Empty))
if (id == Guid.Empty)
{
throw new ArgumentNullException(nameof(id));
throw new ArgumentException(nameof(id), "Guid can't be empty");
}
return Users.FirstOrDefault(u => u.Id == id);