public ObjectInfo GetObjectByPack(string packedHash) { if (!(!string.IsNullOrWhiteSpace(packedHash))) { throw new ArgumentNullException("!string.IsNullOrWhiteSpace(packedHash)"); } lock (Objects) { if (Objects.ContainsValue(packedHash)) { return(new ObjectInfo(Objects.First(x => x.Value.Equals(packedHash)).Key, packedHash)); } } return(null); }