public void Add(EdgeObject obj) { if (_allObjects.ContainsKey(obj)) throw new System.ArgumentException(string.Format("element {0} of type {1} already exists in _allObjects dictionary", obj.Name, obj.GetType().Name)); _otherObjects.Add(obj, obj); _allObjects.Add(obj, obj); }
public void Add(EdgeObject obj, int pass) { if (!_objectsByPass.ContainsKey(pass)) _objectsByPass.Add(pass, new List<EdgeObject>()); _objectsByPass[pass].Add(obj); }
private void AddObjects(EdgeObject obj) { if (obj.MetaProperties != null) { foreach (KeyValuePair<MetaProperty, object> metaProperty in obj.MetaProperties) { if (metaProperty.Value.GetType() != typeof(EdgeObject)) { AddColumn(metaProperty); } else { if (!_objectsManger.ContainsKey((EdgeObject)metaProperty.Value)) _objectsManger.Add((EdgeObject)metaProperty.Value); } } } }
public bool ContainsKey(EdgeObject obj) { return _allObjects.ContainsKey(obj) ? true : false; }