Table of Contents

Class Int16Serializer

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

Represents a serializer for Int16s.

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

Constructors

Int16Serializer()

Initializes a new instance of the Int16Serializer class.

public Int16Serializer()

Int16Serializer(BsonType)

Initializes a new instance of the Int16Serializer class.

public Int16Serializer(BsonType representation)

Parameters

representation BsonType

The representation.

Int16Serializer(BsonType, RepresentationConverter)

Initializes a new instance of the Int16Serializer class.

public Int16Serializer(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 short Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)

Parameters

context BsonDeserializationContext

The deserialization context.

args BsonDeserializationArgs

The deserialization args.

Returns

short

A deserialized value.

Serialize(BsonSerializationContext, BsonSerializationArgs, short)

Serializes a value.

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

Parameters

context BsonSerializationContext

The serialization context.

args BsonSerializationArgs

The serialization args.

value short

The object.

WithConverter(RepresentationConverter)

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

public Int16Serializer WithConverter(RepresentationConverter converter)

Parameters

converter RepresentationConverter

The converter.

Returns

Int16Serializer

The reconfigured serializer.

WithRepresentation(BsonType)

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

public Int16Serializer WithRepresentation(BsonType representation)

Parameters

representation BsonType

The representation.

Returns

Int16Serializer

The reconfigured serializer.