private void AddElement(BaseListElementData data) { m_elementsData.Add(data); data.OnSelectionChanged += SelectionChangeHandler; data.OnClick += ClickHandler; OnElementAdded.Call(data); }
public void Add(TItem value) { if (_head == null) { _head = new BinaryTreeNode <TItem>(value); } else { AddTo(_head, value); } OnElementAdded.Invoke(); _count++; }
protected override void AddElement(IMapElement mapElement) { if (mapElementToHashId.ContainsKey(mapElement)) { hashIdToMapElement[mapElementToHashId[mapElement]].Remove(mapElement); } int cellHashId = GetHashId(mapElement); if (hashIdToMapElement.ContainsKey(cellHashId)) { hashIdToMapElement[cellHashId].Add(mapElement); } else { hashIdToMapElement[cellHashId] = new List <IMapElement> { mapElement }; } mapElementToHashId[mapElement] = cellHashId; OnElementAdded?.Invoke(mapElement); }
protected virtual void OnOnElementAdded(QueueAddEventArgs <T> e) { OnElementAdded?.Invoke(this, e); }