private bool DictionariesEqual(IDictionary x, IDictionary y) { if (x.Count != y.Count) { return(false); } CollectionTally tally = new CollectionTally(this, x.Keys); if (!tally.TryRemove(y.Keys) || tally.Count > 0) { return(false); } foreach (object key in x.Keys) { if (!ObjectsEqual(x[key], y[key])) { return(false); } } return(true); }
private bool DictionariesEqual(IDictionary x, IDictionary y) { if (x.Count != y.Count) return false; CollectionTally tally = new CollectionTally(this, x.Keys); if (!tally.TryRemove(y.Keys) || tally.Count > 0) return false; foreach (object key in x.Keys) if (!ObjectsEqual(x[key], y[key])) return false; return true; }