Interface IDiscriminatorConvention
- Namespace
- MongoDB.Bson.Serialization.Conventions
- Assembly
- MongoDB.Bson.dll
Represents a discriminator convention.
public interface IDiscriminatorConvention
- Extension Methods
Properties
ElementName
Gets the discriminator element name.
string ElementName { get; }
Property Value
Methods
GetActualType(IBsonReader, Type)
Gets the actual type of an object by reading the discriminator from a BsonReader.
Type GetActualType(IBsonReader bsonReader, Type nominalType)
Parameters
bsonReader
IBsonReaderThe reader.
nominalType
TypeThe nominal type.
Returns
- Type
The actual type.
GetDiscriminator(Type, Type)
Gets the discriminator value for an actual type.
BsonValue GetDiscriminator(Type nominalType, Type actualType)
Parameters
Returns
- BsonValue
The discriminator value.