Use ArgumentException.ThrowIfNullOrEmpty

This commit is contained in:
Bond_009
2022-10-13 19:08:00 +02:00
parent 93fd462b58
commit b366dc2e6e
58 changed files with 130 additions and 549 deletions

View File

@@ -29,12 +29,7 @@ namespace MediaBrowser.Model.Cryptography
public PasswordHash(string id, byte[] hash, byte[] salt, Dictionary<string, string> parameters)
{
ArgumentNullException.ThrowIfNull(id);
if (id.Length == 0)
{
throw new ArgumentException("String can't be empty", nameof(id));
}
ArgumentException.ThrowIfNullOrEmpty(id);
Id = id;
_hash = hash;