Table of Contents

Class TypeNameDiscriminator

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

Supports using type names as discriminators.

public static class TypeNameDiscriminator
Inheritance
TypeNameDiscriminator
Inherited Members

Methods

GetActualType(string)

Resolves a type name discriminator.

public static Type GetActualType(string typeName)

Parameters

typeName string

The type name.

Returns

Type

The type if type type name can be resolved; otherwise, null.

GetDiscriminator(Type)

Gets a type name to be used as a discriminator (like AssemblyQualifiedName but shortened for common DLLs).

public static string GetDiscriminator(Type type)

Parameters

type Type

The type.

Returns

string

The type name.