Class DateTimeSerializer
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
MongoDB.Bson.Serialization.Serializers
Assembly
MongoDB.Bson.dll
Represents a serializer for DateTimes.
public sealed class DateTimeSerializer : StructSerializerBase<DateTime>, IBsonSerializer<DateTime>, IBsonSerializer, IRepresentationConfigurable<DateTimeSerializer>, IRepresentationConfigurable, IHasRepresentationSerializer
Inheritance
DateTimeSerializer
Implements
Inherited Members
Extension Methods
Constructors
Initializes a new instance of the DateTimeSerializer class.
Initializes a new instance of the DateTimeSerializer class.
Initializes a new instance of the DateTimeSerializer class.
DateTimeSerializer(bool, BsonType)
Initializes a new instance of the DateTimeSerializer class.
DateTimeSerializer(DateTimeKind)
Initializes a new instance of the DateTimeSerializer class.
DateTimeSerializer(DateTimeKind, BsonType)
Initializes a new instance of the DateTimeSerializer class.
Properties
Gets whether this DateTime consists of a Date only.
Gets an instance of DateTimeSerializer with DateOnly=true.
Gets the default DateTimeSerializer.
Gets the DateTimeKind (Local, Unspecified or Utc).
Gets an instance of DateTimeSerializer with Kind=Local.
Gets the external representation.
Gets an instance of DateTimeSerializer with Kind=Utc.
Methods
Deserialize(BsonDeserializationContext, BsonDeserializationArgs)
Deserializes a value.
Determines whether the specified object is equal to the current object.
Serves as the default hash function.
Serialize(BsonSerializationContext, BsonSerializationArgs, DateTime)
Serializes a value.
Returns a serializer that has been reconfigured with the specified dateOnly value.
Returns a serializer that has been reconfigured with the specified dateOnly value and representation.
Returns a serializer that has been reconfigured with the specified DateTimeKind value.
WithKind(DateTimeKind, BsonType)
Returns a serializer that has been reconfigured with the specified DateTimeKind value and representation.
Returns a serializer that has been reconfigured with the specified representation.