aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2022-12-07 17:17:37 +0100
committerGitHub <noreply@github.com>2022-12-07 17:17:37 +0100
commit584c80e323ac2a1386d86ff9f59e50daf174418e (patch)
tree4dbb2861cb79cf418a76a4b8f364fdc5c62b56f7 /Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs
parentf3c57e6a0ae015dc51cf548a0380d1bed33959c2 (diff)
parent227aa0540bf0d6c00848b0efb8a5e0ece86c7412 (diff)
Merge pull request #8547 from Bond-009/net7
Diffstat (limited to 'Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs')
-rw-r--r--Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs23
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();