Table of Contents

Class BsonDateTimeOptionsAttribute

Namespace
MongoDB.Bson.Serialization.Attributes
Assembly
MongoDB.Bson.dll

Specifies serialization options for a DateTime field or property.

[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
public class BsonDateTimeOptionsAttribute : BsonSerializationOptionsAttribute, IBsonMemberMapAttribute
Inheritance
BsonDateTimeOptionsAttribute
Implements
Inherited Members
Extension Methods

Constructors

BsonDateTimeOptionsAttribute()

Initializes a new instance of the BsonDateTimeOptionsAttribute class.

Properties

DateOnly

Gets or sets whether the DateTime consists of a Date only.

Kind

Gets or sets the DateTimeKind (Local, Unspecified or Utc).

Representation

Gets or sets the external representation.

Methods

Apply(IBsonSerializer)

Reconfigures the specified serializer by applying this attribute to it.