mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 00:35:26 +03:00
Use ArgumentException.ThrowIfNullOrEmpty
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user