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, IKeyValuePairSerializerType Parameters
- TKey
- The type of the keys. 
- TValue
- The 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. 
- Serialize(BsonSerializationContext, BsonSerializationArgs, KeyValuePair<TKey, TValue>)
- Serializes a value. 
- TryGetMemberSerializationInfo(string, out BsonSerializationInfo)
- Tries to get the serialization info for a member.