Class TimeSpanSerializer
- Namespace
- MongoDB.Bson.Serialization.Serializers
- Assembly
- MongoDB.Bson.dll
Represents a serializer for Timespans.
public class TimeSpanSerializer : StructSerializerBase<TimeSpan>, IBsonSerializer<TimeSpan>, IBsonSerializer, IRepresentationConfigurable<TimeSpanSerializer>, IRepresentationConfigurable, IHasRepresentationSerializer
- Inheritance
-
TimeSpanSerializer
- Implements
- Inherited Members
- Extension Methods
Constructors
- TimeSpanSerializer()
Initializes a new instance of the TimeSpanSerializer class.
- TimeSpanSerializer(BsonType)
Initializes a new instance of the TimeSpanSerializer class.
- TimeSpanSerializer(BsonType, TimeSpanUnits)
Initializes a new instance of the TimeSpanSerializer class.
Properties
- Representation
Gets the representation.
- Units
Gets the units.
Methods
- Deserialize(BsonDeserializationContext, BsonDeserializationArgs)
Deserializes a value.
- Serialize(BsonSerializationContext, BsonSerializationArgs, TimeSpan)
Serializes a value.
- WithRepresentation(BsonType)
Returns a serializer that has been reconfigured with the specified representation.
- WithRepresentation(BsonType, TimeSpanUnits)
Returns a serializer that has been reconfigured with the specified representation and units.