mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-28 03:34:46 +03: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:
@@ -53,10 +53,7 @@ namespace MediaBrowser.LocalMetadata.Parsers
|
||||
/// <exception cref="ArgumentNullException">Item is null.</exception>
|
||||
public void Fetch(MetadataResult<T> item, string metadataFile, CancellationToken cancellationToken)
|
||||
{
|
||||
if (item == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(item));
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(item);
|
||||
|
||||
if (string.IsNullOrEmpty(metadataFile))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user