Class ElementAppendingSerializer<TDocument>
- Namespace
- MongoDB.Bson.Serialization.Serializers
- Assembly
- MongoDB.Bson.dll
A serializer that serializes a document and appends elements to the end of it.
public class ElementAppendingSerializer<TDocument> : IBsonSerializer<TDocument>, IBsonSerializer
Type Parameters
TDocument
The type of the document.
- Inheritance
-
ElementAppendingSerializer<TDocument>
- Implements
-
IBsonSerializer<TDocument>
- Inherited Members
- Extension Methods
Constructors
ElementAppendingSerializer(IBsonSerializer<TDocument>, IEnumerable<BsonElement>, Action<BsonWriterSettings>)
Initializes a new instance of the ElementAppendingSerializer<TDocument> class.
public ElementAppendingSerializer(IBsonSerializer<TDocument> documentSerializer, IEnumerable<BsonElement> elements, Action<BsonWriterSettings> writerSettingsConfigurator = null)
Parameters
documentSerializer
IBsonSerializer<TDocument>The document serializer.
elements
IEnumerable<BsonElement>The elements to append.
writerSettingsConfigurator
Action<BsonWriterSettings>The writer settings configurator.
- See Also
-
IBsonSerializer<TValue>
Properties
ValueType
Gets the type of the value.
public Type ValueType { get; }
Property Value
- Type
The type of the value.
- See Also
-
IBsonSerializer<TValue>
Methods
Deserialize(BsonDeserializationContext, BsonDeserializationArgs)
Deserializes a value.
public TDocument Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
Parameters
context
BsonDeserializationContextThe deserialization context.
args
BsonDeserializationArgsThe deserialization args.
Returns
- TDocument
A deserialized value.
- See Also
-
IBsonSerializer<TValue>
Serialize(BsonSerializationContext, BsonSerializationArgs, TDocument)
Serializes a value.
public void Serialize(BsonSerializationContext context, BsonSerializationArgs args, TDocument value)
Parameters
context
BsonSerializationContextThe serialization context.
args
BsonSerializationArgsThe serialization args.
value
TDocumentThe value.
- See Also
-
IBsonSerializer<TValue>
See Also
IBsonSerializer<TValue>