public override int GetHashCode() { int hash = 27; foreach (var key in orderedKeys) { var valueHashCode = GetValueHashCode(this[key]); unchecked { hash = (13 * hash) + key.GetHashCode(); hash = (13 * hash) + valueHashCode; } } return hash; }
public bool Equals(Document obj) { if (obj == null) { return(false); } if (orderedKeys.Count != obj.orderedKeys.Count) { return(false); } return(this.GetHashCode() == obj.GetHashCode()); }