C# Класс MongoDB.Driver.Builders.CollectionOptionsBuilder

Наследование: BuilderBase, IMongoCollectionOptions
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
Serialize ( BsonWriter bsonWriter, Type nominalType, IBsonSerializationOptions options ) : void

Serializes the result of the builder to a BsonWriter.

Описание методов

CollectionOptionsBuilder() публичный Метод

Initializes a new instance of the CollectionOptionsBuilder class.
public CollectionOptionsBuilder ( ) : System
Результат System

Serialize() защищенный Метод

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.
Результат void

SetAutoIndexId() публичный Метод

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.
Результат CollectionOptionsBuilder

SetCapped() публичный Метод

Sets whether the collection is capped.
public SetCapped ( bool value ) : CollectionOptionsBuilder
value bool Whether the collection is capped.
Результат CollectionOptionsBuilder

SetMaxDocuments() публичный Метод

Sets the max number of documents in a capped collection.
public SetMaxDocuments ( long value ) : CollectionOptionsBuilder
value long The max number of documents.
Результат CollectionOptionsBuilder

SetMaxSize() публичный Метод

Sets the max size of a capped collection.
public SetMaxSize ( long value ) : CollectionOptionsBuilder
value long The max size.
Результат CollectionOptionsBuilder

ToBsonDocument() публичный Метод

Returns the result of the builder as a BsonDocument.
public ToBsonDocument ( ) : BsonDocument
Результат BsonDocument