Method WithKeySerializer
- Namespace
- MongoDB.Bson.Serialization.Serializers
- Assembly
- MongoDB.Bson.dll
WithKeySerializer(IBsonSerializer<TKey>)
Returns a serializer that has been reconfigured with the specified key serializer.
public ReadOnlyDictionaryInterfaceImplementerSerializer<TDictionary, TKey, TValue> WithKeySerializer(IBsonSerializer<TKey> keySerializer)Parameters
- keySerializerIBsonSerializer<TKey>
- The key serializer. 
Returns
- ReadOnlyDictionaryInterfaceImplementerSerializer<TDictionary, TKey, TValue>
- The reconfigured serializer.