Class TimeSpanSerializer

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Bson.Serialization.Serializers

Assembly

MongoDB.Bson.dll

Represents a serializer for Timespans.

public sealed 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.

Equals(object)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as the default hash function.

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.