Table of Contents

Method Serialize

Namespace
MongoDB.Bson.Serialization
Assembly
MongoDB.Bson.dll

Serialize(IBsonSerializer, BsonSerializationContext, object)

Serializes a value.

public static void Serialize(this IBsonSerializer serializer, BsonSerializationContext context, object value)

Parameters

serializer IBsonSerializer

The serializer.

context BsonSerializationContext

The serialization context.

value object

The value.

Serialize<TValue>(IBsonSerializer<TValue>, BsonSerializationContext, TValue)

Serializes a value.

public static void Serialize<TValue>(this IBsonSerializer<TValue> serializer, BsonSerializationContext context, TValue value)

Parameters

serializer IBsonSerializer<TValue>

The serializer.

context BsonSerializationContext

The serialization context.

value TValue

The value.

Type Parameters

TValue

The type that this serializer knows how to serialize.