Table of Contents

Method GetBaseTypeSerializer

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

GetBaseTypeSerializer(IBsonSerializer, Type)

Gets the serializer for a base type starting from a serializer for a derived type.

public static IBsonSerializer GetBaseTypeSerializer(this IBsonSerializer derivedTypeSerializer, Type baseType)

Parameters

derivedTypeSerializer IBsonSerializer

The serializer for the derived type.

baseType Type

The base type.

Returns

IBsonSerializer

The serializer for the base type.