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)); } }