Table of Contents

Class Decimal128Serializer

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

Represents a serializer for Decimal128s.

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

Constructors

Decimal128Serializer()

Initializes a new instance of the Decimal128Serializer class.

public Decimal128Serializer()

Decimal128Serializer(BsonType)

Initializes a new instance of the Decimal128Serializer class.

public Decimal128Serializer(BsonType representation)

Parameters

representation BsonType

The representation.

Decimal128Serializer(BsonType, RepresentationConverter)

Initializes a new instance of the Decimal128Serializer class.

public Decimal128Serializer(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.

Decimal128Instance

Gets a cached instance of a Decimal128Serializer with Decimal128 representation.

public static Decimal128Serializer Decimal128Instance { get; }

Property Value

Decimal128Serializer

Representation

Gets the representation.

public BsonType Representation { get; }

Property Value

BsonType

The representation.

Methods

Deserialize(BsonDeserializationContext, BsonDeserializationArgs)

Deserializes a value.

public override Decimal128 Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)

Parameters

context BsonDeserializationContext

The deserialization context.

args BsonDeserializationArgs

The deserialization args.

Returns

Decimal128

A deserialized value.

Serialize(BsonSerializationContext, BsonSerializationArgs, Decimal128)

Serializes a value.

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

Parameters

context BsonSerializationContext

The serialization context.

args BsonSerializationArgs

The serialization args.

value Decimal128

The object.

WithConverter(RepresentationConverter)

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

public Decimal128Serializer WithConverter(RepresentationConverter converter)

Parameters

converter RepresentationConverter

The converter.

Returns

Decimal128Serializer

The reconfigured serializer.

WithRepresentation(BsonType)

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

public Decimal128Serializer WithRepresentation(BsonType representation)

Parameters

representation BsonType

The representation.

Returns

Decimal128Serializer

The reconfigured serializer.