Class ChangeStreamDocumentSerializer<TDocument>
A serializer for ChangeStreamDocument instances.
public class ChangeStreamDocumentSerializer<TDocument> : BsonDocumentBackedClassSerializer<ChangeStreamDocument<TDocument>>, IBsonSerializer<ChangeStreamDocument<TDocument>>, IBsonDocumentSerializer, IBsonSerializer
Type Parameters
TDocument
The type of the document.
- Inheritance
-
SerializerBase<ChangeStreamDocument<TDocument>>ClassSerializerBase<ChangeStreamDocument<TDocument>>ChangeStreamDocumentSerializer<TDocument>
- Implements
-
IBsonSerializer<ChangeStreamDocument<TDocument>>
- Inherited Members
Constructors
ChangeStreamDocumentSerializer(IBsonSerializer<TDocument>)
Initializes a new instance of the ChangeStreamDocumentSerializer<TDocument> class.
public ChangeStreamDocumentSerializer(IBsonSerializer<TDocument> documentSerializer)
Parameters
documentSerializer
IBsonSerializer<TDocument>The document serializer.
Methods
CreateInstance(BsonDocument)
Creates the instance.
protected override ChangeStreamDocument<TDocument> CreateInstance(BsonDocument backingDocument)
Parameters
backingDocument
BsonDocumentThe backing document.
Returns
- ChangeStreamDocument<TDocument>
An instance of TClass.
Deserialize(BsonDeserializationContext, BsonDeserializationArgs)
Deserializes a value.
public override ChangeStreamDocument<TDocument> Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
Parameters
context
BsonDeserializationContextThe deserialization context.
args
BsonDeserializationArgsThe deserialization args.
Returns
- ChangeStreamDocument<TDocument>
A deserialized value.