示例#1
0
        protected override void RemoveItem(int index)
        {
            IAetherNotify <TAether> notify = this[index] as IAetherNotify <TAether>;

            if (notify != null)
            {
                notify.OnDettachedFrom(this);
            }

            base.RemoveItem(index);
        }
示例#2
0
        protected override void InsertItem(int index, TAether item)
        {
            Debug.Assert(!this.Contains(item));
            base.InsertItem(index, item);

            IAetherNotify <TAether> notify = item as IAetherNotify <TAether>;

            if (notify != null)
            {
                notify.OnAttachedTo(this);
            }
        }