Class MongoCollectionSettings
The settings used to access a collection.
public class MongoCollectionSettings
- Inheritance
-
MongoCollectionSettings
- Inherited Members
Constructors
MongoCollectionSettings()
Initializes a new instance of the MongoCollectionSettings class.
public MongoCollectionSettings()
Properties
AssignIdOnInsert
Gets or sets a value indicating whether the driver should assign Id values when missing.
public bool AssignIdOnInsert { get; set; }
Property Value
GuidRepresentation
Gets or sets the representation used for Guids.
[Obsolete("Configure serializers instead.")]
public GuidRepresentation GuidRepresentation { get; set; }
Property Value
IsFrozen
Gets a value indicating whether the settings have been frozen to prevent further changes.
public bool IsFrozen { get; }
Property Value
ReadConcern
Gets or sets the read concern.
public ReadConcern ReadConcern { get; set; }
Property Value
ReadEncoding
Gets or sets the Read Encoding.
public UTF8Encoding ReadEncoding { get; set; }
Property Value
ReadPreference
Gets or sets the read preference to use.
public ReadPreference ReadPreference { get; set; }
Property Value
SerializerRegistry
Gets the serializer registry.
public IBsonSerializerRegistry SerializerRegistry { get; }
Property Value
WriteConcern
Gets or sets the WriteConcern to use.
public WriteConcern WriteConcern { get; set; }
Property Value
WriteEncoding
Gets or sets the Write Encoding.
public UTF8Encoding WriteEncoding { get; set; }
Property Value
Methods
Clone()
Creates a clone of the settings.
public virtual MongoCollectionSettings Clone()
Returns
- MongoCollectionSettings
A clone of the settings.
Equals(object)
Compares two MongoCollectionSettings instances.
public override bool Equals(object obj)
Parameters
obj
objectThe other instance.
Returns
- bool
True if the two instances are equal.
Freeze()
Freezes the settings.
public MongoCollectionSettings Freeze()
Returns
- MongoCollectionSettings
The frozen settings.
FrozenCopy()
Returns a frozen copy of the settings.
public MongoCollectionSettings FrozenCopy()
Returns
- MongoCollectionSettings
A frozen copy of the settings.
GetHashCode()
Gets the hash code.
public override int GetHashCode()
Returns
- int
The hash code.
ToString()
Returns a string representation of the settings.
public override string ToString()
Returns
- string
A string representation of the settings.