Table of Contents

Class SingleSerializer

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

Represents a serializer for Singles.

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

Constructors

SingleSerializer()

Initializes a new instance of the SingleSerializer class.

public SingleSerializer()

SingleSerializer(BsonType)

Initializes a new instance of the SingleSerializer class.

public SingleSerializer(BsonType representation)

Parameters

representation BsonType

The representation.

SingleSerializer(BsonType, RepresentationConverter)

Initializes a new instance of the SingleSerializer class.

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

Representation

Gets the representation.

public BsonType Representation { get; }

Property Value

BsonType

The representation.

Methods

Deserialize(BsonDeserializationContext, BsonDeserializationArgs)

Deserializes a value.

public override float Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)

Parameters

context BsonDeserializationContext

The deserialization context.

args BsonDeserializationArgs

The deserialization args.

Returns

float

A deserialized value.

Serialize(BsonSerializationContext, BsonSerializationArgs, float)

Serializes a value.

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

Parameters

context BsonSerializationContext

The serialization context.

args BsonSerializationArgs

The serialization args.

value float

The object.

WithConverter(RepresentationConverter)

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

public SingleSerializer WithConverter(RepresentationConverter converter)

Parameters

converter RepresentationConverter

The converter.

Returns

SingleSerializer

The reconfigured serializer.

WithRepresentation(BsonType)

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

public SingleSerializer WithRepresentation(BsonType representation)

Parameters

representation BsonType

The representation.

Returns

SingleSerializer

The reconfigured serializer.