Class MongoDBRefSerializer
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
BsonDeserializationContextThe deserialization context.
args
BsonDeserializationArgsThe 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
BsonSerializationContextThe serialization context.
args
BsonSerializationArgsThe serialization args.
value
MongoDBRefThe value.
TryGetMemberSerializationInfo(string, out BsonSerializationInfo)
Tries to get the serialization info for a member.
public bool TryGetMemberSerializationInfo(string memberName, out BsonSerializationInfo serializationInfo)
Parameters
memberName
stringName of the member.
serializationInfo
BsonSerializationInfoThe serialization information.
Returns
- bool
true
if the serialization info exists; otherwisefalse
.