public override void Serialize(BsonWriter bsonWriter, System.Type nominalType, object value, IBsonSerializationOptions options)
{
var rectangle = (Rectangle) value;
bsonWriter.WriteStartDocument();
WriteVector(bsonWriter,"Min",rectangle.Min);
WriteVector(bsonWriter,"Max",rectangle.Max);
bsonWriter.WriteDouble("Width",rectangle.Width);
bsonWriter.WriteDouble("Height",rectangle.Height);
bsonWriter.WriteEndDocument();
}