Method Serialize
- Namespace
- MongoDB.Bson.Serialization
- Assembly
- MongoDB.Bson.dll
Serialize<TNominalType>(IBsonWriter, TNominalType, Action<Builder>, BsonSerializationArgs)
Serializes a value.
public static void Serialize<TNominalType>(IBsonWriter bsonWriter, TNominalType value, Action<BsonSerializationContext.Builder> configurator = null, BsonSerializationArgs args = default)
Parameters
bsonWriter
IBsonWriterThe BsonWriter.
value
TNominalTypeThe object.
configurator
Action<BsonSerializationContext.Builder>The serialization context configurator.
args
BsonSerializationArgsThe serialization args.
Type Parameters
TNominalType
The nominal type of the object.
Serialize(IBsonWriter, Type, object, Action<Builder>, BsonSerializationArgs)
Serializes a value.
public static void Serialize(IBsonWriter bsonWriter, Type nominalType, object value, Action<BsonSerializationContext.Builder> configurator = null, BsonSerializationArgs args = default)
Parameters
bsonWriter
IBsonWriterThe BsonWriter.
nominalType
TypeThe nominal type of the object.
value
objectThe object.
configurator
Action<BsonSerializationContext.Builder>The serialization context configurator.
args
BsonSerializationArgsThe serialization args.