/// <summary>
/// Makes sure that the underlying ID index is in sync
/// when an item is removed.
/// </summary>
/// <param name="index">Index of PubSubItem to remove.</param>
public override void RemoveAt(int index)
{
PubSubItem item = (PubSubItem)this[index];
string id = item.GetAttribute("id");
if (id != "")
{
m_index.Remove(id);
}
base.RemoveAt(index);
m_node.ItemRemoved(item);
// renumber
for (int i = index; i < Count; i++)
{
item = (PubSubItem)this[i];
id = item.ID;
if (id != "")
{
m_index[id] = i;
}
}
}