Exemple #1
0
		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;
		}
Exemple #2
0
		public Container   CreateContainer() {
			Container c = new Container();
			m_containers.Add(c);
			return c;
		}