C# Class MongoDB.Driver.Builders.CollectionOptionsBuilder

Inheritance: BuilderBase, IMongoCollectionOptions
Afficher le fichier Open project: CloudMetal/mongo-csharp-driver Class Usage Examples

Méthodes publiques

Méthode Description
CollectionOptionsBuilder ( ) : System

Initializes a new instance of the CollectionOptionsBuilder class.

SetAutoIndexId ( bool value ) : CollectionOptionsBuilder

Sets whether to automatically create an index on the _id element.

SetCapped ( bool value ) : CollectionOptionsBuilder

Sets whether the collection is capped.

SetMaxDocuments ( long value ) : CollectionOptionsBuilder

Sets the max number of documents in a capped collection.

SetMaxSize ( long value ) : CollectionOptionsBuilder

Sets the max size of a capped collection.

ToBsonDocument ( ) : BsonDocument

Returns the result of the builder as a BsonDocument.

Méthodes protégées

Méthode Description
Serialize ( BsonWriter bsonWriter, Type nominalType, IBsonSerializationOptions options ) : void

Serializes the result of the builder to a BsonWriter.

Method Details

CollectionOptionsBuilder() public méthode

Initializes a new instance of the CollectionOptionsBuilder class.
public CollectionOptionsBuilder ( ) : System
Résultat System

Serialize() protected méthode

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.
Résultat void

SetAutoIndexId() public méthode

Sets whether to automatically create an index on the _id element.
public SetAutoIndexId ( bool value ) : CollectionOptionsBuilder
value bool Whether to automatically create an index on the _id element.
Résultat CollectionOptionsBuilder

SetCapped() public méthode

Sets whether the collection is capped.
public SetCapped ( bool value ) : CollectionOptionsBuilder
value bool Whether the collection is capped.
Résultat CollectionOptionsBuilder

SetMaxDocuments() public méthode

Sets the max number of documents in a capped collection.
public SetMaxDocuments ( long value ) : CollectionOptionsBuilder
value long The max number of documents.
Résultat CollectionOptionsBuilder

SetMaxSize() public méthode

Sets the max size of a capped collection.
public SetMaxSize ( long value ) : CollectionOptionsBuilder
value long The max size.
Résultat CollectionOptionsBuilder

ToBsonDocument() public méthode

Returns the result of the builder as a BsonDocument.
public ToBsonDocument ( ) : BsonDocument
Résultat BsonDocument