Table of Contents

Class ObjectDiscriminatorConvention

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

Represents the object discriminator convention.

public class ObjectDiscriminatorConvention : IDiscriminatorConvention
Inheritance
ObjectDiscriminatorConvention
Implements
Inherited Members
Extension Methods

Constructors

ObjectDiscriminatorConvention(string)

Initializes a new instance of the ObjectDiscriminatorConvention class.

Properties

ElementName

Gets the discriminator element name.

Instance

Gets an instance of the ObjectDiscriminatorConvention.

Methods

GetActualType(IBsonReader, Type)

Gets the actual type of an object by reading the discriminator from a BsonReader.

GetDiscriminator(Type, Type)

Gets the discriminator value for an actual type.