public void Validate() { if (Device == null) { throw new ArgumentNullException(nameof(Device)); } if (Device.IsExpiredUnused) { throw new ArgumentException("device code expired unused", nameof(Device)); } if (!Device.IsValid) { throw new ArgumentException("device not valid", nameof(Device)); } if (Device.DeviceCode.ContainsSpace()) { throw new ArgumentException("device code not valid", nameof(Device.DeviceCode)); } if (string.IsNullOrEmpty(ClientId) || ClientId.ContainsSpace()) { throw new ArgumentException("client id not valid", nameof(ClientId)); } if (string.IsNullOrEmpty(ClientSecret) || ClientSecret.ContainsSpace()) { throw new ArgumentException("client secret not valid", nameof(ClientSecret)); } }
public void Validate() { if (string.IsNullOrEmpty(AccessToken) || AccessToken.ContainsSpace()) { throw new ArgumentException("access token not valid", nameof(AccessToken)); } if (string.IsNullOrEmpty(ClientId) || ClientId.ContainsSpace()) { throw new ArgumentException("client id not valid", nameof(ClientId)); } if (string.IsNullOrEmpty(ClientSecret) || ClientSecret.ContainsSpace()) { throw new ArgumentException("client secret not valid", nameof(ClientSecret)); } }
public void Validate() { if (string.IsNullOrEmpty(RefreshToken) || RefreshToken.ContainsSpace()) { throw new ArgumentException("refresh token not valid", nameof(RefreshToken)); } if (string.IsNullOrEmpty(ClientId) || ClientId.ContainsSpace()) { throw new ArgumentException("client id not valid", nameof(ClientId)); } if (string.IsNullOrEmpty(ClientSecret) || ClientSecret.ContainsSpace()) { throw new ArgumentException("client secret not valid", nameof(ClientSecret)); } if (string.IsNullOrEmpty(RedirectUri) || RedirectUri.ContainsSpace()) { throw new ArgumentException("redirect uri not valid", nameof(RedirectUri)); } }