public override bool IsSameSpace(ValueSpace space) { if (space is BinarySpace) { BinarySpace bspace = (BinarySpace)space; if (bspace._paramTable.Count != _paramTable.Count) { return(false); } IEnumerator param = _paramTable.GetEnumerator(); while (param.MoveNext()) { DictionaryEntry entry = (DictionaryEntry)param.Current; if (!bspace._paramTable.ContainsKey(entry.Key) || bspace._paramTable[entry.Key] != entry.Value) { return(false); } } return(true); } return(false); }
/* * Overridden Methods */ /// <summary> /// Returns a shallow copy of this BinarySpace. /// </summary> /// <returns>a shallow copy of this BinarySpace</returns> public override object Clone() { BinarySpace bspc = new BinarySpace(); IEnumerator e = _paramTable.GetEnumerator(); while (e.MoveNext()) { bspc._paramTable[((DictionaryEntry)e.Current).Key] = ((DictionaryEntry)e.Current).Value; } return(bspc); }