Class FirestoreDocumentCreateTimestampAttribute (2.4.0)

[AttributeUsage(AttributeTargets.Property)]
public sealed class FirestoreDocumentCreateTimestampAttribute : Attribute

Attribute indicating that a property should be populated with the creation timestamp from a Firestore document snapshot.

Inheritance

Object > Attribute > FirestoreDocumentCreateTimestampAttribute

Namespace

Google.Cloud.Firestore

Assembly

Google.Cloud.Firestore.dll

Remarks

This attribute must only be applied to properties of DateTime, DateTimeOffset, Timestamp, or the nullable equivalents, or a Timestamp. This attribute is ignored when serializing a document to Firestore. This attribute must not be applied on a property which also has FirestorePropertyAttribute. When deserializing a snapshot representing a missing document, nullable properties will be set to a null value; non-nullable properties will be set to the default value of the type (0001-01-01 for DateTime and DateTimeOffset, 1970-01-01 for Timestamp).

Constructors

FirestoreDocumentCreateTimestampAttribute()

public FirestoreDocumentCreateTimestampAttribute()

Creates an instance of the attribute.