aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs
diff options
context:
space:
mode:
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();