public void RemoveAt(int index) { var e = new ListOptionEventArgs(null); this.Removing?.Invoke(this, e); this.InnerList.RemoveAt(index); this.Removed?.Invoke(this, e); }
public void Insert(int index, TValue value) { if (this.Contains(value)) { throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorOptionDuplicateValueFormat, this.Owner.Name, value)); } var e = new ListOptionEventArgs(value); this.Inserting?.Invoke(this, e); this.InnerList.Insert(index, CastValue(e.Value)); this.Inserted?.Invoke(this, e); }
private void InnerList_Removed(object sender, ListOptionEventArgs e) { OnValueChanged(e.Value); }
private void InnerList_Inserting(object sender, ListOptionEventArgs e) { e.Value = OnValueChanging(e.Value); }