Class BsonWriterSettings
Represents settings for a BsonWriter.
[Serializable]
public abstract class BsonWriterSettings
- Inheritance
-
BsonWriterSettings
- Derived
- Inherited Members
- Extension Methods
Constructors
BsonWriterSettings()
Initializes a new instance of the BsonWriterSettings class.
protected BsonWriterSettings()
BsonWriterSettings(GuidRepresentation)
Initializes a new instance of the BsonWriterSettings class.
[Obsolete("Configure serializers instead.")]
protected BsonWriterSettings(GuidRepresentation guidRepresentation)
Parameters
guidRepresentation
GuidRepresentationThe representation for Guids.
Properties
GuidRepresentation
Gets or sets the representation for Guids.
[Obsolete("Configure serializers instead.")]
public GuidRepresentation GuidRepresentation { get; set; }
Property Value
IsFrozen
Gets whether the settings are frozen.
public bool IsFrozen { get; }
Property Value
MaxSerializationDepth
Gets or sets the max serialization depth allowed (used to detect circular references).
public int MaxSerializationDepth { get; set; }
Property Value
Methods
Clone()
Creates a clone of the settings.
public BsonWriterSettings Clone()
Returns
- BsonWriterSettings
A clone of the settings.
CloneImplementation()
Creates a clone of the settings.
protected abstract BsonWriterSettings CloneImplementation()
Returns
- BsonWriterSettings
A clone of the settings.
Freeze()
Freezes the settings.
public BsonWriterSettings Freeze()
Returns
- BsonWriterSettings
The frozen settings.
FrozenCopy()
Returns a frozen copy of the settings.
public BsonWriterSettings FrozenCopy()
Returns
- BsonWriterSettings
A frozen copy of the settings.
ThrowFrozenException()
Throws an InvalidOperationException when an attempt is made to change a setting after the settings are frozen.
protected void ThrowFrozenException()