mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00: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:
@@ -294,10 +294,7 @@ namespace Emby.Server.Implementations.Updates
|
||||
/// <inheritdoc />
|
||||
public async Task InstallPackage(InstallationInfo package, CancellationToken cancellationToken)
|
||||
{
|
||||
if (package == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(package));
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(package);
|
||||
|
||||
var innerCancellationTokenSource = new CancellationTokenSource();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user