Class DictionaryInterfaceImplementerSerializer<TDictionary>
- Namespace
- MongoDB.Bson.Serialization.Serializers
- Assembly
- MongoDB.Bson.dll
Represents a serializer for a class that implements IDictionary.
public class DictionaryInterfaceImplementerSerializer<TDictionary> : DictionarySerializerBase<TDictionary>, IBsonSerializer<TDictionary>, IBsonDocumentSerializer, IBsonSerializer, IBsonDictionarySerializer, IChildSerializerConfigurable, IDictionaryRepresentationConfigurable where TDictionary : class, IDictionary, new()
Type Parameters
TDictionary
The type of the dictionary.
- Inheritance
-
SerializerBase<TDictionary>ClassSerializerBase<TDictionary>DictionarySerializerBase<TDictionary>DictionaryInterfaceImplementerSerializer<TDictionary>
- Implements
-
IBsonSerializer<TDictionary>
- Inherited Members
- Extension Methods
Constructors
DictionaryInterfaceImplementerSerializer()
Initializes a new instance of the DictionaryInterfaceImplementerSerializer<TDictionary> class.
public DictionaryInterfaceImplementerSerializer()
DictionaryInterfaceImplementerSerializer(DictionaryRepresentation)
Initializes a new instance of the DictionaryInterfaceImplementerSerializer<TDictionary> class.
public DictionaryInterfaceImplementerSerializer(DictionaryRepresentation dictionaryRepresentation)
Parameters
dictionaryRepresentation
DictionaryRepresentationThe dictionary representation.
DictionaryInterfaceImplementerSerializer(DictionaryRepresentation, IBsonSerializer, IBsonSerializer)
Initializes a new instance of the DictionaryInterfaceImplementerSerializer<TDictionary> class.
public DictionaryInterfaceImplementerSerializer(DictionaryRepresentation dictionaryRepresentation, IBsonSerializer keySerializer, IBsonSerializer valueSerializer)
Parameters
dictionaryRepresentation
DictionaryRepresentationThe dictionary representation.
keySerializer
IBsonSerializerThe key serializer.
valueSerializer
IBsonSerializerThe value serializer.
Methods
CreateInstance()
Creates the instance.
protected override TDictionary CreateInstance()
Returns
- TDictionary
The instance.
WithDictionaryRepresentation(DictionaryRepresentation)
Returns a serializer that has been reconfigured with the specified dictionary representation.
public DictionaryInterfaceImplementerSerializer<TDictionary> WithDictionaryRepresentation(DictionaryRepresentation dictionaryRepresentation)
Parameters
dictionaryRepresentation
DictionaryRepresentationThe dictionary representation.
Returns
- DictionaryInterfaceImplementerSerializer<TDictionary>
The reconfigured serializer.
WithDictionaryRepresentation(DictionaryRepresentation, IBsonSerializer, IBsonSerializer)
Returns a serializer that has been reconfigured with the specified dictionary representation and key value serializers.
public DictionaryInterfaceImplementerSerializer<TDictionary> WithDictionaryRepresentation(DictionaryRepresentation dictionaryRepresentation, IBsonSerializer keySerializer, IBsonSerializer valueSerializer)
Parameters
dictionaryRepresentation
DictionaryRepresentationThe dictionary representation.
keySerializer
IBsonSerializerThe key serializer.
valueSerializer
IBsonSerializerThe value serializer.
Returns
- DictionaryInterfaceImplementerSerializer<TDictionary>
The reconfigured serializer.
WithKeySerializer(IBsonSerializer)
Returns a serializer that has been reconfigured with the specified key serializer.
public DictionaryInterfaceImplementerSerializer<TDictionary> WithKeySerializer(IBsonSerializer keySerializer)
Parameters
keySerializer
IBsonSerializerThe key serializer.
Returns
- DictionaryInterfaceImplementerSerializer<TDictionary>
The reconfigured serializer.
WithValueSerializer(IBsonSerializer)
Returns a serializer that has been reconfigured with the specified value serializer.
public DictionaryInterfaceImplementerSerializer<TDictionary> WithValueSerializer(IBsonSerializer valueSerializer)
Parameters
valueSerializer
IBsonSerializerThe value serializer.
Returns
- DictionaryInterfaceImplementerSerializer<TDictionary>
The reconfigured serializer.