public virtual void Swap(int indexA, int indexB) { //bug: do we really need two enumerations to find the approprate links? Ring.IndexedLink link1 = _storage.FindAtIndex(indexA); Ring.IndexedLink link2 = _storage.FindAtIndex(indexB); _storage.SwapValues(link1, link2); }
public virtual void Remove(object value) { Ring.IndexedLink findResult = _storage.Find(value); if (findResult != null) { _storage.RemoveLink(findResult); } }
public virtual object this[int index] { get { return(_storage.FindAtIndex(index) .Value); } set { Ring.IndexedLink findResult = _storage.FindAtIndex(index); _storage.IncrementEditVersion(); findResult.RingLink.Value = value; } }
public object FindLast(Predicate whereClause) { Ring.IndexedLink indexedLink = _storage.FindLast(whereClause); return((indexedLink == null) ? null : indexedLink.Value); }
public int IndexOf(object value) { Ring.IndexedLink findResult = _storage.Find(value); return((findResult == null) ? -1 : findResult.Index); }