Table of Contents

Class MongoDBRefSerializer

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Represents a serializer for MongoDBRefs.

public class MongoDBRefSerializer : ClassSerializerBase<MongoDBRef>, IBsonSerializer<MongoDBRef>, IBsonDocumentSerializer, IBsonSerializer
Inheritance
MongoDBRefSerializer
Implements
Inherited Members

Constructors

MongoDBRefSerializer()

Initializes a new instance of the MongoDBRefSerializer class.

public MongoDBRefSerializer()

Methods

DeserializeValue(BsonDeserializationContext, BsonDeserializationArgs)

Deserializes a value.

protected override MongoDBRef DeserializeValue(BsonDeserializationContext context, BsonDeserializationArgs args)

Parameters

context BsonDeserializationContext

The deserialization context.

args BsonDeserializationArgs

The deserialization args.

Returns

MongoDBRef

The value.

SerializeValue(BsonSerializationContext, BsonSerializationArgs, MongoDBRef)

Serializes a value.

protected override void SerializeValue(BsonSerializationContext context, BsonSerializationArgs args, MongoDBRef value)

Parameters

context BsonSerializationContext

The serialization context.

args BsonSerializationArgs

The serialization args.

value MongoDBRef

The value.

TryGetMemberSerializationInfo(string, out BsonSerializationInfo)

Tries to get the serialization info for a member.

public bool TryGetMemberSerializationInfo(string memberName, out BsonSerializationInfo serializationInfo)

Parameters

memberName string

Name of the member.

serializationInfo BsonSerializationInfo

The serialization information.

Returns

bool

true if the serialization info exists; otherwise false.