public void SerializeProperty(
     BsonWriter bsonWriter,
     object obj,
     BsonPropertyMap propertyMap
 )
 {
     var value = (BsonDateTime) propertyMap.Getter(obj);
     if (value == null) {
         bsonWriter.WriteNull(propertyMap.ElementName);
     } else {
         bsonWriter.WriteDateTime(propertyMap.ElementName, value.Value);
     }
 }
 public void SerializeProperty(
     BsonWriter bsonWriter,
     object obj,
     BsonPropertyMap propertyMap
 )
 {
     var value = (DateTime) propertyMap.Getter(obj);
     bsonWriter.WriteDateTime(propertyMap.ElementName, value);
 }