mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-15 10:43:30 +01:00
Use ArgumentNullException.ThrowIfNull helper method
Did a simple search/replace on the whole repo (except the RSSDP project)
This reduces LOC and should improve performance (methods containing a throw statement don't get inlined)
```
if \((\w+) == null\)
\s+\{
\s+throw new ArgumentNullException\((.*)\);
\s+\}
```
```
ArgumentNullException.ThrowIfNull($1);
```
This commit is contained in:
@@ -29,10 +29,7 @@ namespace MediaBrowser.Model.Cryptography
|
||||
|
||||
public PasswordHash(string id, byte[] hash, byte[] salt, Dictionary<string, string> parameters)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(id));
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(id);
|
||||
|
||||
if (id.Length == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user