/// <summary> /// Not supported. /// </summary> /// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param> /// <returns> /// Always false. /// </returns> public bool Contains(VirtualizingCollectionDataWrapper <T> item) { foreach (VirtualizingCollectionDataPage <T> page in _pages.Values) { if (page.Items.Contains(item)) { return(true); } } return(false); }
/// <summary> /// TODO /// </summary> /// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.IList`1"/>.</param> /// <returns> /// TODO /// </returns> public int IndexOf(VirtualizingCollectionDataWrapper <T> item) { foreach (KeyValuePair <int, VirtualizingCollectionDataPage <T> > keyValuePair in _pages) { int indexWithinPage = keyValuePair.Value.Items.IndexOf(item); if (indexWithinPage != -1) { return(PageSize * keyValuePair.Key + indexWithinPage); } } return(-1); }
/// <summary> /// Not supported. /// </summary> /// <param name="item">The object to remove from the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param> /// <returns> /// true if <paramref name="item"/> was successfully removed from the <see cref="T:System.Collections.Generic.ICollection`1"/>; otherwise, false. This method also returns false if <paramref name="item"/> is not found in the original <see cref="T:System.Collections.Generic.ICollection`1"/>. /// </returns> /// <exception cref="T:System.NotSupportedException"> /// The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only. /// </exception> public bool Remove(VirtualizingCollectionDataWrapper <T> item) { throw new NotSupportedException(); }
/// <summary> /// Not supported. /// </summary> /// <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param> /// <param name="item">The object to insert into the <see cref="T:System.Collections.Generic.IList`1"/>.</param> /// <exception cref="T:System.ArgumentOutOfRangeException"> /// <paramref name="index"/> is not a valid index in the <see cref="T:System.Collections.Generic.IList`1"/>. /// </exception> /// <exception cref="T:System.NotSupportedException"> /// The <see cref="T:System.Collections.Generic.IList`1"/> is read-only. /// </exception> public void Insert(int index, VirtualizingCollectionDataWrapper <T> item) { throw new NotSupportedException(); }
/// <summary> /// Not supported. /// </summary> /// <param name="item">The object to add to the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param> /// <exception cref="T:System.NotSupportedException"> /// The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only. /// </exception> public void Add(VirtualizingCollectionDataWrapper <T> item) { throw new NotSupportedException(); }