protected virtual void OnItemAdding(ItemAddingEventArgs e) { if (this.ItemAdding != null) { this.ItemAdding(this, e); } }
internal bool AddItemManually() { ItemAddingEventArgs e = new ItemAddingEventArgs(this.Items.Count); this.OnItemAdding(e); if ((e.ListItem != null) && !e.Cancel) { this.Items.Add(e.ListItem); } return e.Cancel; }