private Credential ReadCredential(Credential credential) { Credential.ValidateForLookup(credential); Credential result = Credential.Copy(credential); string password; if (credStore.TryGetPassword(credential.CredentialId, out password)) { result.Password = password; } return(result); }