C# Class MongoDB.Bson.Serialization.Conventions.ScalarDiscriminatorConvention

Represents a discriminator convention where the discriminator is provided by the class map of the actual type.
Inheritance: StandardDiscriminatorConvention
Show file Open project: egametang/Egametang Class Usage Examples

Public Methods

Method Description
GetDiscriminator ( Type nominalType, Type actualType ) : BsonValue

Gets the discriminator value for an actual type.

ScalarDiscriminatorConvention ( string elementName ) : System

Initializes a new instance of the ScalarDiscriminatorConvention class.

Method Details

GetDiscriminator() public method

Gets the discriminator value for an actual type.
public GetDiscriminator ( Type nominalType, Type actualType ) : BsonValue
nominalType System.Type The nominal type.
actualType System.Type The actual type.
return BsonValue

ScalarDiscriminatorConvention() public method

Initializes a new instance of the ScalarDiscriminatorConvention class.
public ScalarDiscriminatorConvention ( string elementName ) : System
elementName string The element name.
return System