internal static bool ContainsUniqueKeyNames(SecretKeyListV3 keys, out string errorMessage) { bool flag; HashSet <string> strs = new HashSet <string>(); List <SecretKeyV3> .Enumerator enumerator = keys.GetEnumerator(); try { while (enumerator.MoveNext()) { SecretKeyV3 current = enumerator.Current; if (strs.Add(current.Name)) { continue; } errorMessage = string.Format("More than one secret key is named {0}.", current.Name); flag = false; return(flag); } errorMessage = null; return(true); } finally { ((IDisposable)enumerator).Dispose(); } return(flag); }
public object Clone() { SecretKeyListV3 secretKeyListV3 = new SecretKeyListV3(); foreach (SecretKeyV3 secretKeyV3 in this) { secretKeyListV3.Add((SecretKeyV3)secretKeyV3.Clone()); } return(secretKeyListV3); }