Class CollectionOptionsBuilder
A builder for the options used when creating a collection.
[Serializable]
[BsonSerializer(typeof(CollectionOptionsBuilder.Serializer))]
public class CollectionOptionsBuilder : BuilderBase, IConvertibleToBsonDocument, IMongoCollectionOptions
- Inheritance
-
CollectionOptionsBuilder
- Implements
- Inherited Members
- Extension Methods
Constructors
- CollectionOptionsBuilder()
Initializes a new instance of the CollectionOptionsBuilder class.
Methods
- SetAutoIndexId(bool)
Sets whether to automatically create an index on the _id element.
- SetCapped(bool)
Sets whether the collection is capped.
- SetCollation(Collation)
Sets the collation.
- SetIndexOptionDefaults(IndexOptionDefaults)
Sets the index options defaults.
- SetMaxDocuments(long)
Sets the max number of documents in a capped collection.
- SetMaxSize(long)
Sets the max size of a capped collection.
- SetStorageEngineOptions(BsonDocument)
Sets the storage engine options.
- SetValidationAction(DocumentValidationAction)
Sets the validation action.
- SetValidationLevel(DocumentValidationLevel)
Sets the validation level.
- SetValidator(IMongoQuery)
Sets the validator.
- ToBsonDocument()
Returns the result of the builder as a BsonDocument.