Table of Contents

Class Int64Serializer

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

Represents a serializer for Int64s.

public class Int64Serializer : StructSerializerBase<long>, IBsonSerializer<long>, IBsonSerializer, IRepresentationConfigurable<Int64Serializer>, IRepresentationConfigurable, IHasRepresentationSerializer, IRepresentationConverterConfigurable<Int64Serializer>, IRepresentationConverterConfigurable
Inheritance
Int64Serializer
Implements
Inherited Members
Extension Methods

Constructors

Int64Serializer()

Initializes a new instance of the Int64Serializer class.

public Int64Serializer()

Int64Serializer(BsonType)

Initializes a new instance of the Int64Serializer class.

public Int64Serializer(BsonType representation)

Parameters

representation BsonType

The representation.

Int64Serializer(BsonType, RepresentationConverter)

Initializes a new instance of the Int64Serializer class.

public Int64Serializer(BsonType representation, RepresentationConverter converter)

Parameters

representation BsonType

The representation.

converter RepresentationConverter

The converter.

Properties

Converter

Gets the converter.

public RepresentationConverter Converter { get; }

Property Value

RepresentationConverter

The converter.

Instance

Gets a cached instance of an Int64Serializer;

public static Int64Serializer Instance { get; }

Property Value

Int64Serializer

Representation

Gets the representation.

public BsonType Representation { get; }

Property Value

BsonType

The representation.

Methods

Deserialize(BsonDeserializationContext, BsonDeserializationArgs)

Deserializes a value.

public override long Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)

Parameters

context BsonDeserializationContext

The deserialization context.

args BsonDeserializationArgs

The deserialization args.

Returns

long

A deserialized value.

Serialize(BsonSerializationContext, BsonSerializationArgs, long)

Serializes a value.

public override void Serialize(BsonSerializationContext context, BsonSerializationArgs args, long value)

Parameters

context BsonSerializationContext

The serialization context.

args BsonSerializationArgs

The serialization args.

value long

The object.

WithConverter(RepresentationConverter)

Returns a serializer that has been reconfigured with the specified item serializer.

public Int64Serializer WithConverter(RepresentationConverter converter)

Parameters

converter RepresentationConverter

The converter.

Returns

Int64Serializer

The reconfigured serializer.

WithRepresentation(BsonType)

Returns a serializer that has been reconfigured with the specified representation.

public Int64Serializer WithRepresentation(BsonType representation)

Parameters

representation BsonType

The representation.

Returns

Int64Serializer

The reconfigured serializer.