Class Int32Serializer
- Namespace
- MongoDB.Bson.Serialization.Serializers
- Assembly
- MongoDB.Bson.dll
Represents a serializer for Int32.
public class Int32Serializer : StructSerializerBase<int>, IBsonSerializer<int>, IBsonSerializer, IRepresentationConfigurable<Int32Serializer>, IRepresentationConfigurable, IHasRepresentationSerializer, IRepresentationConverterConfigurable<Int32Serializer>, IRepresentationConverterConfigurable
- Inheritance
-
Int32
Serializer
- Implements
- Inherited Members
- Extension Methods
Constructors
Int32Serializer()
Initializes a new instance of the Int32
Int32Serializer(BsonType)
Initializes a new instance of the Int32
Parameters
representation
BsonType The representation.
Int32Serializer(BsonType, RepresentationConverter)
Initializes a new instance of the Int32
Parameters
representation
BsonType The representation.
converter
RepresentationConverter The converter.
Properties
Converter
Gets the converter.
Property Value
- Representation
Converter The converter.
Instance
Gets a cached instance of an Int32Serializer;
Property Value
Representation
Gets the representation.
Property Value
- Bson
Type The representation.
Methods
Deserialize(BsonDeserializationContext, BsonDeserializationArgs)
Deserializes a value.
Parameters
context
BsonDeserialization Context The deserialization context.
args
BsonDeserialization Args The deserialization args.
Returns
- int
A deserialized value.
Serialize(BsonSerializationContext, BsonSerializationArgs, int)
Serializes a value.
public override void Serialize(BsonSerializationContext context, BsonSerializationArgs args, int value)
Parameters
context
BsonSerialization Context The serialization context.
args
BsonSerialization Args The serialization args.
value
intThe object.
WithConverter(RepresentationConverter)
Returns a serializer that has been reconfigured with the specified item serializer.
Parameters
converter
RepresentationConverter The converter.
Returns
- Int32
Serializer The reconfigured serializer.
WithRepresentation(BsonType)
Returns a serializer that has been reconfigured with the specified representation.
Parameters
representation
BsonType The representation.
Returns
- Int32
Serializer The reconfigured serializer.