Class MongoDatabaseSettings
The settings used to access a database.
public class MongoDatabaseSettings
- Inheritance
-
MongoDatabaseSettings
- Inherited Members
Constructors
MongoDatabaseSettings()
Creates a new instance of MongoDatabaseSettings.
public MongoDatabaseSettings()
Properties
GuidRepresentation
Gets or sets the representation to use 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.
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 MongoDatabaseSettings Clone()
Returns
- MongoDatabaseSettings
A clone of the settings.
Equals(object)
Compares two MongoDatabaseSettings 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 MongoDatabaseSettings Freeze()
Returns
- MongoDatabaseSettings
The frozen settings.
FrozenCopy()
Returns a frozen copy of the settings.
public MongoDatabaseSettings FrozenCopy()
Returns
- MongoDatabaseSettings
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.