text: public override bool Equals(object obj){var otherDocument = obj as Document;if (otherDocument == null)return false;if (Keys.Count != otherDocument.Keys.Count)return false;foreach(var key in Keys){if (!otherDocument.ContainsKey(key))return false;var a = this[key];var b = otherDocument[key];if (!a.Equals(b))return false;}return true;}