C# Class MongoDB.Driver.Builders.IndexOptionsBuilder

Inheritance: BuilderBase, IMongoIndexOptions
Show file Open project: CloudMetal/mongo-csharp-driver Class Usage Examples

Public Methods

Method Description
IndexOptionsBuilder ( ) : System

Initializes a new instance of the IndexOptionsBuilder class.

SetBackground ( bool value ) : IndexOptionsBuilder

Sets whether to build the index in the background.

SetBucketSize ( double value ) : IndexOptionsBuilder

Sets the bucket size for geospatial haystack indexes.

SetDropDups ( bool value ) : IndexOptionsBuilder

Sets whether duplicates should be dropped.

SetGeoSpatialRange ( double min, double max ) : IndexOptionsBuilder

Sets the geospatial range.

SetName ( string value ) : IndexOptionsBuilder

Sets the name of the index.

SetSparse ( bool value ) : IndexOptionsBuilder

Sets whether the index is a sparse index.

SetTimeToLive ( System.TimeSpan timeToLive ) : IndexOptionsBuilder

Sets the time to live value.

SetUnique ( bool value ) : IndexOptionsBuilder

Sets whether the index enforces unique values.

ToBsonDocument ( ) : BsonDocument

Returns the result of the builder as a BsonDocument.

Protected Methods

Method Description
Serialize ( BsonWriter bsonWriter, Type nominalType, IBsonSerializationOptions options ) : void

Serializes the result of the builder to a BsonWriter.

Method Details

IndexOptionsBuilder() public method

Initializes a new instance of the IndexOptionsBuilder class.
public IndexOptionsBuilder ( ) : System
return System

Serialize() protected method

Serializes the result of the builder to a BsonWriter.
protected Serialize ( BsonWriter bsonWriter, Type nominalType, IBsonSerializationOptions options ) : void
bsonWriter BsonWriter The writer.
nominalType System.Type The nominal type.
options IBsonSerializationOptions The serialization options.
return void

SetBackground() public method

Sets whether to build the index in the background.
public SetBackground ( bool value ) : IndexOptionsBuilder
value bool Whether to build the index in the background.
return IndexOptionsBuilder

SetBucketSize() public method

Sets the bucket size for geospatial haystack indexes.
public SetBucketSize ( double value ) : IndexOptionsBuilder
value double The bucket size.
return IndexOptionsBuilder

SetDropDups() public method

Sets whether duplicates should be dropped.
public SetDropDups ( bool value ) : IndexOptionsBuilder
value bool Whether duplicates should be dropped.
return IndexOptionsBuilder

SetGeoSpatialRange() public method

Sets the geospatial range.
public SetGeoSpatialRange ( double min, double max ) : IndexOptionsBuilder
min double The min value of the range.
max double The max value of the range.
return IndexOptionsBuilder

SetName() public method

Sets the name of the index.
public SetName ( string value ) : IndexOptionsBuilder
value string The name of the index.
return IndexOptionsBuilder

SetSparse() public method

Sets whether the index is a sparse index.
public SetSparse ( bool value ) : IndexOptionsBuilder
value bool Whether the index is a sparse index.
return IndexOptionsBuilder

SetTimeToLive() public method

Sets the time to live value.
public SetTimeToLive ( System.TimeSpan timeToLive ) : IndexOptionsBuilder
timeToLive System.TimeSpan The time to live.
return IndexOptionsBuilder

SetUnique() public method

Sets whether the index enforces unique values.
public SetUnique ( bool value ) : IndexOptionsBuilder
value bool Whether the index enforces unique values.
return IndexOptionsBuilder

ToBsonDocument() public method

Returns the result of the builder as a BsonDocument.
public ToBsonDocument ( ) : BsonDocument
return BsonDocument