Class KeyValuePairSerializer<TKey, TValue>
- Namespace
 - MongoDB.Bson.Serialization.Serializers
 
- Assembly
 - MongoDB.Bson.dll
 
Represents a serializer for KeyValuePairs.
public sealed class KeyValuePairSerializer<TKey, TValue> : StructSerializerBase<KeyValuePair<TKey, TValue>>, IBsonSerializer<KeyValuePair<TKey, TValue>>, IBsonDocumentSerializer, IBsonSerializer, IKeyValuePairSerializer
  Type Parameters
TKeyThe type of the keys.
TValueThe type of the values.
- Inheritance
 - 
      
      SerializerBase<KeyValuePair<TKey, TValue>>StructSerializerBase<KeyValuePair<TKey, TValue>>KeyValuePairSerializer<TKey, TValue>
 
- Implements
 - 
      IBsonSerializer<KeyValuePair<TKey, TValue>>
 
- 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)
 Determines whether the specified object is equal to the current object.
- GetHashCode()
 Serves as the default hash function.
- Serialize(BsonSerializationContext, BsonSerializationArgs, KeyValuePair<TKey, TValue>)
 Serializes a value.
- TryGetMemberSerializationInfo(string, out BsonSerializationInfo)
 Tries to get the serialization info for a member.