Table of Contents

Class MaterializedOnDemandBsonArray

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

Represents a BSON array that is not materialized until you start using it.

[BsonSerializer(typeof(MaterializedOnDemandBsonArray.MaterializedOnDemandBsonArraySerializer))]
public abstract class MaterializedOnDemandBsonArray : BsonArray, IComparable<BsonValue>, IConvertible, IEquatable<BsonValue>, IComparable<BsonArray>, IEquatable<BsonArray>, IList<BsonValue>, ICollection<BsonValue>, IEnumerable<BsonValue>, IEnumerable, IDisposable
Inheritance
MaterializedOnDemandBsonArray
Implements
Derived
Inherited Members
Extension Methods

Constructors

MaterializedOnDemandBsonArray()

Initializes a new instance of the MaterializedOnDemandBsonArray class.

Properties

Capacity

Gets or sets the total number of elements the internal data structure can hold without resizing.

Count

Gets the count of array elements.

IsDisposed

Gets a value indicating whether this instance is disposed.

IsMaterialized

Gets a value indicating whether this instance is materialized.

this[int]

Gets or sets a value by position.

RawValues

Gets the array elements as raw values (see BsonValue.RawValue).

Values

Gets the array elements.

Methods

Add(BsonValue)

Adds an element to the array.

AddRange(IEnumerable<BsonValue>)

Adds multiple elements to the array.

AddRange(IEnumerable<ObjectId>)

Adds multiple elements to the array.

AddRange(IEnumerable<bool>)

Adds multiple elements to the array.

AddRange(IEnumerable<DateTime>)

Adds multiple elements to the array.

AddRange(IEnumerable<double>)

Adds multiple elements to the array.

AddRange(IEnumerable<int>)

Adds multiple elements to the array.

AddRange(IEnumerable<long>)

Adds multiple elements to the array.

AddRange(IEnumerable<string>)

Adds multiple elements to the array.

AddRange(IEnumerable)

Adds multiple elements to the array.

Clear()

Clears the array.

Clone()

Creates a shallow clone of the array (see also DeepClone).

CompareTo(BsonArray)

Compares the array to another array.

CompareTo(BsonValue)

Compares the array to another BsonValue.

Contains(BsonValue)

Tests whether the array contains a value.

CopyTo(BsonValue[], int)

Copies elements from this array to another array.

CopyTo(object[], int)

Copies elements from this array to another array as raw values (see BsonValue.RawValue).

DeepClone()

Creates a deep clone of the array (see also Clone).

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

Equals(object)

Determines whether the specified object, is equal to this instance.

GetEnumerator()

Gets an enumerator that can enumerate the elements of the array.

GetHashCode()

Gets the hash code.

IndexOf(BsonValue)

Gets the index of a value in the array.

IndexOf(BsonValue, int)

Gets the index of a value in the array.

IndexOf(BsonValue, int, int)

Gets the index of a value in the array.

Insert(int, BsonValue)

Inserts a new value into the array.

Materialize()

Materializes the BsonArray.

MaterializeCompleted()

Informs subclasses that the Materialize process completed so they can free any resources related to the unmaterialized state.

Remove(BsonValue)

Removes the first occurrence of a value from the array.

RemoveAt(int)

Removes an element from the array.

ThrowIfDisposed()

Throws if disposed.

ToArray()

Converts the BsonArray to an array of BsonValues.

ToList()

Converts the BsonArray to a list of BsonValues.

ToString()

Returns a string representation of the array.