Table of Contents

Class DictionaryInterfaceImplementerSerializer<TDictionary, TKey, TValue>

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

Represents a serializer for a class that implements IDictionary<TKey, TValue>.

public class DictionaryInterfaceImplementerSerializer<TDictionary, TKey, TValue> : DictionarySerializerBase<TDictionary, TKey, TValue>, IBsonSerializer<TDictionary>, IBsonArraySerializer, IBsonDocumentSerializer, IBsonSerializer, IBsonDictionarySerializer, IChildSerializerConfigurable, IDictionaryRepresentationConfigurable<DictionaryInterfaceImplementerSerializer<TDictionary, TKey, TValue>>, IDictionaryRepresentationConfigurable where TDictionary : class, IDictionary<TKey, TValue>

Type Parameters

TDictionary

The type of the dictionary.

TKey

The type of the key.

TValue

The type of the value.

Inheritance
SerializerBase<TDictionary>
ClassSerializerBase<TDictionary>
DictionarySerializerBase<TDictionary, TKey, TValue>
DictionaryInterfaceImplementerSerializer<TDictionary, TKey, TValue>
Implements
IBsonSerializer<TDictionary>
Inherited Members
Extension Methods

Constructors

DictionaryInterfaceImplementerSerializer()

public DictionaryInterfaceImplementerSerializer()

DictionaryInterfaceImplementerSerializer(DictionaryRepresentation)

public DictionaryInterfaceImplementerSerializer(DictionaryRepresentation dictionaryRepresentation)

Parameters

dictionaryRepresentation DictionaryRepresentation

The dictionary representation.

DictionaryInterfaceImplementerSerializer(DictionaryRepresentation, IBsonSerializer<TKey>, IBsonSerializer<TValue>)

public DictionaryInterfaceImplementerSerializer(DictionaryRepresentation dictionaryRepresentation, IBsonSerializer<TKey> keySerializer, IBsonSerializer<TValue> valueSerializer)

Parameters

dictionaryRepresentation DictionaryRepresentation

The dictionary representation.

keySerializer IBsonSerializer<TKey>

The key serializer.

valueSerializer IBsonSerializer<TValue>

The value serializer.

Methods

CreateAccumulator()

Creates an accumulator.

protected override ICollection<KeyValuePair<TKey, TValue>> CreateAccumulator()

Returns

ICollection<KeyValuePair<TKey, TValue>>

The accumulator.

WithDictionaryRepresentation(DictionaryRepresentation)

Returns a serializer that has been reconfigured with the specified dictionary representation.

public DictionaryInterfaceImplementerSerializer<TDictionary, TKey, TValue> WithDictionaryRepresentation(DictionaryRepresentation dictionaryRepresentation)

Parameters

dictionaryRepresentation DictionaryRepresentation

The dictionary representation.

Returns

DictionaryInterfaceImplementerSerializer<TDictionary, TKey, TValue>

The reconfigured serializer.

WithDictionaryRepresentation(DictionaryRepresentation, IBsonSerializer<TKey>, IBsonSerializer<TValue>)

Returns a serializer that has been reconfigured with the specified dictionary representation and key value serializers.

public DictionaryInterfaceImplementerSerializer<TDictionary, TKey, TValue> WithDictionaryRepresentation(DictionaryRepresentation dictionaryRepresentation, IBsonSerializer<TKey> keySerializer, IBsonSerializer<TValue> valueSerializer)

Parameters

dictionaryRepresentation DictionaryRepresentation

The dictionary representation.

keySerializer IBsonSerializer<TKey>

The key serializer.

valueSerializer IBsonSerializer<TValue>

The value serializer.

Returns

DictionaryInterfaceImplementerSerializer<TDictionary, TKey, TValue>

The reconfigured serializer.

WithKeySerializer(IBsonSerializer<TKey>)

Returns a serializer that has been reconfigured with the specified key serializer.

public DictionaryInterfaceImplementerSerializer<TDictionary, TKey, TValue> WithKeySerializer(IBsonSerializer<TKey> keySerializer)

Parameters

keySerializer IBsonSerializer<TKey>

The key serializer.

Returns

DictionaryInterfaceImplementerSerializer<TDictionary, TKey, TValue>

The reconfigured serializer.

WithValueSerializer(IBsonSerializer<TValue>)

Returns a serializer that has been reconfigured with the specified value serializer.

public DictionaryInterfaceImplementerSerializer<TDictionary, TKey, TValue> WithValueSerializer(IBsonSerializer<TValue> valueSerializer)

Parameters

valueSerializer IBsonSerializer<TValue>

The value serializer.

Returns

DictionaryInterfaceImplementerSerializer<TDictionary, TKey, TValue>

The reconfigured serializer.