diff options
| author | Bond_009 <bond.009@outlook.com> | 2022-10-13 19:08:00 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2022-12-07 16:43:59 +0100 |
| commit | b366dc2e6e5be2b93f2b6fcc4549a32b655c3806 (patch) | |
| tree | 8f7ee8407e31e58db9aabe74bfc21936275ec45e /Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs | |
| parent | 93fd462b581207d937c5d4eb939b1cc96c86c1f2 (diff) | |
Use ArgumentException.ThrowIfNullOrEmpty
Diffstat (limited to 'Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs b/Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs index 532c8d1e3..c4bda9637 100644 --- a/Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs +++ b/Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs @@ -71,25 +71,10 @@ namespace Emby.Server.Implementations.QuickConnect /// <inheritdoc/> public QuickConnectResult TryConnect(AuthorizationInfo authorizationInfo) { - if (string.IsNullOrEmpty(authorizationInfo.DeviceId)) - { - throw new ArgumentException(nameof(authorizationInfo.DeviceId) + " is required"); - } - - if (string.IsNullOrEmpty(authorizationInfo.Device)) - { - throw new ArgumentException(nameof(authorizationInfo.Device) + " is required"); - } - - if (string.IsNullOrEmpty(authorizationInfo.Client)) - { - throw new ArgumentException(nameof(authorizationInfo.Client) + " is required"); - } - - if (string.IsNullOrEmpty(authorizationInfo.Version)) - { - throw new ArgumentException(nameof(authorizationInfo.Version) + "is required"); - } + ArgumentException.ThrowIfNullOrEmpty(authorizationInfo.DeviceId); + ArgumentException.ThrowIfNullOrEmpty(authorizationInfo.Device); + ArgumentException.ThrowIfNullOrEmpty(authorizationInfo.Client); + ArgumentException.ThrowIfNullOrEmpty(authorizationInfo.Version); AssertActive(); ExpireRequests(); |
