public virtual void CheckConsistency() { ReadOnlyIndexCollectionList InternalList = InternalIndexCollectionList; ReadOnlyIndexCollectionReadOnlyList PublicList = IndexCollectionList; for (int i = 0; i < InternalList.Count; i++) { IReadOnlyIndexCollection InternalItem = InternalList[i]; Debug.Assert(PublicList.Contains(InternalItem)); Debug.Assert(PublicList.IndexOf(InternalItem) >= 0); IReadOnlyIndexCollection PublicItem = PublicList[i]; Debug.Assert(InternalList.Contains(PublicItem)); Debug.Assert(InternalList.IndexOf(PublicItem) >= 0); if (i == 0) { Debug.Assert(!((ICollection <IReadOnlyIndexCollection>)InternalList).IsReadOnly); InternalList.Remove(InternalItem); InternalList.Insert(0, InternalItem); IEnumerable <IReadOnlyIndexCollection> AsEnumerable = InternalList; foreach (IReadOnlyIndexCollection Item in AsEnumerable) { Debug.Assert(Item == InternalItem); break; } } } }
/// <inheritdoc/> public ReadOnlyIndexCollectionReadOnlyList(ReadOnlyIndexCollectionList list) : base(list) { }