public void Add(IDataItem <T> item) { if (item.ID.Equals(default(T))) { item.ID = _keybuilder.GetNextKey(); } _items.Add(item.ID, item); _index.Add(item.Name, item.ID); }
public DimensionMembersCollection() { _keybuilder = AbsIdentityKey <T> .Create(); _type = ItemType.Member; this.memberOnAdd = (item) => { if (item.ID.Equals(default(T))) { item.ID = _keybuilder.GetNextKey(); } }; this.Init(); }