private void ValidatePasswordCredential(PasswordCredential credential) { if (credential == null || string.IsNullOrEmpty(credential.KeyId) || string.IsNullOrEmpty(credential.Value) || credential.StartDate == null || credential.EndDate == null) { throw new InvalidOperationException(ProjectResources.PasswordCredentialNotValid); } }