Table of Contents

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

Properties

ValueType

Gets the type of the value.

public Type ValueType { get; }

Property Value

Type

The type of the value.

See Also

Methods

Deserialize(BsonDeserializationContext, BsonDeserializationArgs)

Deserializes a value.

public TDocument Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)

Parameters

context BsonDeserializationContext

The deserialization context.

args BsonDeserializationArgs

The deserialization args.

Returns

TDocument

A deserialized value.

See Also

Serialize(BsonSerializationContext, BsonSerializationArgs, TDocument)

Serializes a value.

public void Serialize(BsonSerializationContext context, BsonSerializationArgs args, TDocument value)

Parameters

context BsonSerializationContext

The serialization context.

args BsonSerializationArgs

The serialization args.

value TDocument

The value.

See Also

See Also

IBsonSerializer<TValue>