/// <summary> /// Wrap a list in a read-only wrapper. A list gets wrapped as read-only, /// a list view gets wrapped as read-only and non-slidable. /// </summary> /// <param name="list">The list</param> public GuardedList(IList <T> list) : base(list) { innerlist = list; // If wrapping a list view, make innerlist = the view, and make // underlying = a guarded version of the view's underlying list if (list.Underlying != null) { underlying = new GuardedList <T>(list.Underlying, null, false); } }
private GuardedList(IList <T> list, GuardedList <T>?underlying, bool slidableView) : base(list) { innerlist = list; this.underlying = underlying; this.slidableView = slidableView; }