Table of Contents

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 IBsonWriter

The BsonWriter.

value TNominalType

The object.

configurator Action<BsonSerializationContext.Builder>

The serialization context configurator.

args BsonSerializationArgs

The 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 IBsonWriter

The BsonWriter.

nominalType Type

The nominal type of the object.

value object

The object.

configurator Action<BsonSerializationContext.Builder>

The serialization context configurator.

args BsonSerializationArgs

The serialization args.