8 Commits (d2b72a19c93d73f3ac52a5b2f75eb3722d561fdd)

Author SHA1 Message Date
rstam 4afb1fbd05 Added more explicit mappings to MapToBsonValue and added unit tests for this overload of MapToBsonValue. 15 years ago
rstam 3bcbd156ec Added support for Enums to BsonTypeMapper. Added unit tests for BsonTypeMapper. 15 years ago
rstam 8e7a944581 This commit is about simplifying serialization and improving performance at the same time. At the lowest level, the API for BsonReader and BsonWriter has changed to support the higher level changes. The DeserializeDocument/DeserializeElement and SerializeDocument/SerializeElement paired methods have been simplified to just Deserialize and Serialize. Similarly, the GetActualDocumentType/GetActualElementType paired methods in IDiscriminatorConvention have been simplified to a single GetActualType method. The HasElement methods in BsonReader have been removed because using them resulted in BsonTypes and Names being read twice. The support for bookmarks in BsonReader has been decoupled from the context stack. BsonWriter now allows the Name to be written before the BsonType is known (in the BSON binary form the BsonType comes before the Name) and delays physically writing the name to the BSON output stream until the value is written at which point the BsonType is known. 15 years ago
rstam 0d0aeeca0c Fixed a bug in BsonRegularExpression constructor when string containing a JavaScript syntax regular expression has escaped slashes. 15 years ago
rstam 8f9aace2de BsonRegularExpression constructor now recognizes "/pattern/opt" as a JavaScript style regular expression and parses out the pattern and the options. 15 years ago
rstam d13dda9efb Implemented EnumerableSerializer (serializes ArrayList, IEnumerable, ICollection and IList). Factored out GetActualDocumentType and GetActualElementType as static methods that can be called as needed from anywhere. Use BsonType as implied discriminator for primitive types. Fixed references to deprecated BsonConstants. 15 years ago
rstam cb4b2b14ea Renamed Singleton to Value in BsonNull, BsonMaxKey and BsonMinKey (follow pattern set by DBNull.Value in .NET). Throw ArgumentNullException if Value of BsonElement is set to null. Added AsNullableBoolean, AsNullableDateTime, AsNullableDouble, AsNullableGuid, AsNullableInt32, AsNullableInt64 and AsNullableObjectId to BsonValue. Added implicit conversions from and explicit conversions to bool?, DateTime?, double?, Guid?, int?, long? and ObjectId?. 15 years ago
rstam 3900d3f0db Renamed MongoDB.BsonLibrary namespace to MongoDB.Bson and MongoDB.CSharpDriver to MongoDB.Driver (Library was redundant and VB users might not want to see CSharp in the namespace). Renamed Bson static class BsonConstants (because it a class can't have the same name as the namespace it is in). 15 years ago