Use ArgumentNullException.ThrowIfNull when possible (#2591)

* Misc.

* Fix mistake
This commit is contained in:
Sebastian Göls
2022-05-26 13:29:12 +02:00
committed by GitHub
parent c9b1e46013
commit 68e30b43c2
13 changed files with 50 additions and 153 deletions

View File

@@ -591,9 +591,7 @@ internal static class PluginsCore {
}
internal static async Task OnUpdateFinished(Version newVersion) {
if (newVersion == null) {
throw new ArgumentNullException(nameof(newVersion));
}
ArgumentNullException.ThrowIfNull(newVersion);
if ((ActivePlugins == null) || (ActivePlugins.Count == 0)) {
return;
@@ -607,9 +605,7 @@ internal static class PluginsCore {
}
internal static async Task OnUpdateProceeding(Version newVersion) {
if (newVersion == null) {
throw new ArgumentNullException(nameof(newVersion));
}
ArgumentNullException.ThrowIfNull(newVersion);
if ((ActivePlugins == null) || (ActivePlugins.Count == 0)) {
return;