Click or drag to resize

CreateCollectionOptionsTDocument Class

Options for creating a collection.
Inheritance Hierarchy
SystemObject
  MongoDB.DriverCreateCollectionOptions
    MongoDB.DriverCreateCollectionOptionsTDocument

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.20.0+ee01960089f28ea1b501690df5fc9f6318a70242
Syntax
public sealed class CreateCollectionOptions<TDocument> : CreateCollectionOptions

Type Parameters

TDocument
The type of the document.

The CreateCollectionOptionsTDocument type exposes the following members.

Constructors
  NameDescription
Public methodCreateCollectionOptionsTDocument
Initializes a new instance of the CreateCollectionOptionsTDocument class
Top
Properties
  NameDescription
Public propertyAutoIndexId Obsolete.
Gets or sets a value indicating whether to automatically create an index on the _id.
(Inherited from CreateCollectionOptions.)
Public propertyCapped
Gets or sets a value indicating whether the collection is capped.
(Inherited from CreateCollectionOptions.)
Public propertyChangeStreamPreAndPostImagesOptions
Gets or sets Gets or sets a change streams pre and post images options.
(Inherited from CreateCollectionOptions.)
Public propertyClusteredIndex
Public propertyCollation
Gets or sets the collation.
(Inherited from CreateCollectionOptions.)
Public propertyDocumentSerializer
Gets or sets the document serializer.
Public propertyEncryptedFields
Gets or sets encrypted fields.
(Inherited from CreateCollectionOptions.)
Public propertyExpireAfter
Gets or sets a timespan indicating how long documents in a time series collection should be retained.
(Inherited from CreateCollectionOptions.)
Public propertyIndexOptionDefaults
Gets or sets the index option defaults.
(Inherited from CreateCollectionOptions.)
Public propertyMaxDocuments
Gets or sets the maximum number of documents (used with capped collections).
(Inherited from CreateCollectionOptions.)
Public propertyMaxSize
Gets or sets the maximum size of the collection (used with capped collections).
(Inherited from CreateCollectionOptions.)
Public propertyNoPadding
Gets or sets whether padding should not be used.
(Inherited from CreateCollectionOptions.)
Public propertySerializerRegistry
Gets or sets the serializer registry.
(Inherited from CreateCollectionOptions.)
Public propertyStorageEngine
Gets or sets the storage engine options.
(Inherited from CreateCollectionOptions.)
Public propertyTimeSeriesOptions
Gets or sets the TimeSeriesOptions to use when creating a time series collection.
(Inherited from CreateCollectionOptions.)
Public propertyUsePowerOf2Sizes
Gets or sets a value indicating whether to use power of 2 sizes.
(Inherited from CreateCollectionOptions.)
Public propertyValidationAction
Gets or sets the validation action.
(Inherited from CreateCollectionOptions.)
Public propertyValidationLevel
Gets or sets the validation level.
(Inherited from CreateCollectionOptions.)
Public propertyValidator
Gets or sets the validator.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
See Also