Struct BsonSerializationArgs
- Namespace
- MongoDB.Bson.Serialization
- Assembly
- MongoDB.Bson.dll
Represents args common to all serializers.
public struct BsonSerializationArgs
- Inherited Members
- Extension Methods
Constructors
BsonSerializationArgs(Type, bool, bool)
Initializes a new instance of the BsonSerializationArgs struct.
public BsonSerializationArgs(Type nominalType, bool serializeAsNominalType, bool serializeIdFirst)
Parameters
nominalType
TypeThe nominal type.
serializeAsNominalType
boolWhether to serialize as the nominal type.
serializeIdFirst
boolWhether to serialize the id first.
Properties
NominalType
Gets or sets the nominal type.
public Type NominalType { get; set; }
Property Value
- Type
The nominal type.
SerializeAsNominalType
Gets or sets a value indicating whether to serialize the value as if it were an instance of the nominal type.
public bool SerializeAsNominalType { get; set; }
Property Value
SerializeIdFirst
Gets or sets a value indicating whether to serialize the id first.
public bool SerializeIdFirst { get; set; }