Table of Contents

Class BsonDiscriminatorAttribute

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

Specifies the discriminator and related options for a class.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct)]
public class BsonDiscriminatorAttribute : Attribute, IBsonClassMapAttribute
Inheritance
BsonDiscriminatorAttribute
Implements
Inherited Members
Extension Methods

Constructors

BsonDiscriminatorAttribute()

Initializes a new instance of the BsonDiscriminatorAttribute class.

BsonDiscriminatorAttribute(string)

Initializes a new instance of the BsonDiscriminatorAttribute class.

Properties

Discriminator

Gets the discriminator.

Required

Gets or sets whether the discriminator is required.

RootClass

Gets or sets whether this is a root class.

Methods

Apply(BsonClassMap)

Applies a modification to the class map.