public override IMongoCollection <TDerivedDocument> WithReadConcern(ReadConcern readConcern) { return(new OfTypeMongoCollection <TRootDocument, TDerivedDocument>(_rootDocumentCollection, WrappedCollection.WithReadConcern(readConcern), Filter)); }
///<summary> ///Returns an enumerator that iterates through the collection. ///</summary> ///<remarks>returns the enumerator from the wrapped collection.</remarks> ///<returns> ///A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. ///</returns> ///<filterpriority>1</filterpriority> public override IEnumerator <T> GetEnumerator() { return(WrappedCollection.GetEnumerator()); }
public void Clear() { WrappedCollection.Clear(); collection.Clear(); }
///<summary> ///Removes the first occurrence of a specific object from the <see cref="T:System.Collections.Generic.ICollection`1"></see>. ///</summary> ///<remarks>This implementation removes the item from the wrapped collection</remarks> ///<returns> ///true if item was successfully removed from the <see cref="T:System.Collections.Generic.ICollection`1"></see>; otherwise, false. This method also returns false if item is not found in the original <see cref="T:System.Collections.Generic.ICollection`1"></see>. ///</returns> /// ///<param name="item">The object to remove from the <see cref="T:System.Collections.Generic.ICollection`1"></see>.</param> ///<exception cref="T:System.NotSupportedException">The wrapped <see cref="T:System.Collections.Generic.ICollection`1"></see> is read-only.</exception> public override bool Remove(T item) { return(WrappedCollection.Remove(item)); }