public Entry[] Enumerate() { Entry[] result = new Entry[m_entries.Count]; IEnumerator e = m_entries.GetEnumerator(); int i = 0; while (e.MoveNext()) { DictionaryEntry entry = (DictionaryEntry)e.Current; result[i].key = (String)entry.Key; result[i++].value = (String)entry.Value; } return result; }
public Container[] FilterContainers(Entry[] filter) { ArrayList matches; if ((filter == null) || (filter.Length == 0)) { matches = m_containers; } else { matches = new ArrayList(); foreach (Container c in m_containers) { int i = 0; bool match = true; do { String value = c.GetValue(filter[i].key); match = (value != null) && (value == filter[i].value); } while ((++i < filter.Length) && match); if (match) { matches.Add(c); } } } Container[] res = new Container[matches.Count]; matches.CopyTo(res); return res; }
public void SetEntry(Entry e) { SetValue(e.key, e.value); }