public void DeserializeProperty( BsonReader bsonReader, object obj, BsonPropertyMap propertyMap ) { var value = bsonReader.ReadBoolean(propertyMap.ElementName); propertyMap.Setter(obj, value); }
public void DeserializeProperty( BsonReader bsonReader, object obj, BsonPropertyMap propertyMap ) { var bsonType = bsonReader.PeekBsonType(); BsonBoolean value; if (bsonType == BsonType.Null) { bsonReader.ReadNull(propertyMap.ElementName); value = null; } else { value = BsonBoolean.Create(bsonReader.ReadBoolean(propertyMap.ElementName)); } propertyMap.Setter(obj, value); }