Exemple #1
0
 public override IMongoCollection <TDerivedDocument> WithReadConcern(ReadConcern readConcern)
 {
     return(new OfTypeMongoCollection <TRootDocument, TDerivedDocument>(_rootDocumentCollection, WrappedCollection.WithReadConcern(readConcern), Filter));
 }
Exemple #2
0
 ///<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());
 }
Exemple #3
0
 public void Clear()
 {
     WrappedCollection.Clear();
     collection.Clear();
 }
Exemple #4
0
 ///<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));
 }