Table of Contents

Class KeyValuePairSerializer<TKey, TValue>

Namespace
MongoDB.Bson.Serialization.Serializers
Assembly
MongoDB.Bson.dll

Represents a serializer for KeyValuePairs.

public class KeyValuePairSerializer<TKey, TValue> : StructSerializerBase<KeyValuePair<TKey, TValue>>, IBsonSerializer<KeyValuePair<TKey, TValue>>, IBsonDocumentSerializer, IBsonSerializer, IKeyValuePairSerializer

Type Parameters

TKey

The type of the keys.

TValue

The type of the values.

Inheritance
KeyValuePairSerializer<TKey, TValue>
Implements
Inherited Members
Extension Methods

Constructors

KeyValuePairSerializer()

Initializes a new instance of the KeyValuePairSerializer<TKey, TValue> class.

KeyValuePairSerializer(BsonType)

Initializes a new instance of the KeyValuePairSerializer<TKey, TValue> class.

KeyValuePairSerializer(BsonType, IBsonSerializerRegistry)

Initializes a new instance of the KeyValuePairSerializer<TKey, TValue> class.

KeyValuePairSerializer(BsonType, IBsonSerializer<TKey>, IBsonSerializer<TValue>)

Initializes a new instance of the KeyValuePairSerializer<TKey, TValue> class.

Properties

KeySerializer

Gets the key serializer.

Representation

Gets the representation.

ValueSerializer

Gets the value serializer.

Methods

Deserialize(BsonDeserializationContext, BsonDeserializationArgs)

Deserializes a value.

Equals(object)
GetHashCode()
Serialize(BsonSerializationContext, BsonSerializationArgs, KeyValuePair<TKey, TValue>)

Serializes a value.

TryGetMemberSerializationInfo(string, out BsonSerializationInfo)

Tries to get the serialization info for a member.