8 Commits (4c1b6d2a80cf1b9b87157b9d758ebe63d864b9ef)

Author SHA1 Message Date
rstam 4c1b6d2a80 Initial framework of LINQ implementation. Please note that this doesn't really do anything yet because the MongoLinqTranslator class is stubbed out. 14 years ago
rstam d788f8a907 Added a bunch of missing doc comments. For some reason the C# compiler was not warning about any of these, but the Sandcastle Help File Builder was. 14 years ago
rstam bb88a48b01 Incorporated Brian Knight's fix for CSHARP-310 with minor changes. 14 years ago
rstam fed330f5d4 Worked on the wording of hundreds of exception messages. Things like turning them into complete sentences that end in a period and adding relevant values when they are helpful. 14 years ago
Syed Saleem Javid Brahmanapalli a9392f3a25 Added some comments 14 years ago
saleemjavid 950b293fcd The changes for ShouldSerializeXXX implementation 14 years ago
rstam 6f9e959f54 Second round of namespace refactoring. Removed the MongoDB.Bson.DefaultSerializer namespace and moved everything from it into the MongoDB.Bson.Serialization namespace or one of its child namespaces (Attributes, Conventions or Options). The goal here is to unify serialization under the MongoDB.Bson.Serialization namespace and that the most common uses of serialization require only a single using statement for the top level namespace. A secondary goal is to organize the namespace hierarchy a little better as presented in the help file. 15 years ago
rstam 92f1a8da09 Added and tweaked some doc comments here and there. 15 years ago
rstam e6ee37289d Added doc comments for BsonClassMapSerializer, BsonDefaultSerializer and BsonMemberMap. 15 years ago
rstam ecfafcafd1 Implemented CSHARP-172. Allow an ObjectId in the database to be represented as a string in memory so domain classes don't have to depend on the driver for the ObjectId class if they don't want to. Also added StringObjectIdGenerator. 15 years ago
rstam 368990e892 When a BsonMemberMap has an explicit serializer it will be used no matter what the actualType is. 15 years ago
rstam b552f5e394 Updated copyright notices. 15 years ago
rstam eb87b92c72 Moved serialization options from a field of the serializers to a parameter of Serialize and Deserialize. Replaced serializeIdFirst with DocumentSerializationOptions (serializeIdFirst can be though of as a serialization option that applies to documents). This change cuts down on the number of serializers that have to be created and registered. While a relatively small change conceptually it affected a huge number of lines of code. 15 years ago
rstam c71e88a564 Implemented GetLastErrorResult. Moved implementation of IdGenerators from DefaultSerializer to Serializer because they have to work with BsonDocument even if the DefaultSerializer is never invoked. Shortened BsonIdGenerator to IdGenerator. Added ZeroIdChecker<T> where T : struct to check that struct Ids are not all zeros. LookupIdGenerator now defaults to NullIdChecker for reference types and ZeroIdChecker for value types. 15 years ago
rstam bfbb581b5a Fixed CSHARP-104. Put in some better error checking and exception error messages. 15 years ago
rstam aaf25455aa Added SetRepresentation to BsonMemberMap. Added ConnectionMode, ReplicaSetName, SafeMode, and SlaveOk to MongoConnectionSettings, MongoUrl and MongoConnectionStringBuilder. Implemented new connection string options (in both MongoUrl and MongoConnectionStringBuilder). Added FSync to SafeMode and changed names of Replications and Timeout to W and WTimeout to closely match the documentation of getlasterror. Added unit tests for MongoConnectionStringBuilder. Improved unit tests for MongoUrl (and added some new ones). 15 years ago
rstam 9c250395d0 Replaced UseCompactRepresentation with a more general mechanism based on serialization options. Added BsonRepresentationAttribute. Serializers are now registered using a combined type/options key because the serialization options are stored in the serializer instance. 15 years ago
rstam 4f605c35f2 Added name based versions of MapField, MapIdField, MapIdMember, MapIdProperty, MapMember and MapProperty to BsonClassMap. Added lamda based versions of MapField, MapIdField, MapIdMember, MapIdProperty, MapMember and MapProperty to BsonClassMap<TClass>. Removed BsonMemberMap<TClass, TMember> subclass because it is not longer needed; so BsonMemberMap is also no longer abstract. Added some more unit tests. 15 years ago
rstam 6f0f5056e2 Moved GetMemberInfoType to BsonClassMap. Fixed formatting. 15 years ago
rstam fdee1842e3 Fixed line endings. 15 years ago
craiggwilson 2a749e62ba implemented field setting using reflection.emit. added tests. 15 years ago
craiggwilson d21bd9f8e2 completed changes to accomodate fields as well as properties. 15 years ago
craiggwilson 2bbf0bdeb8 changed all implementations to use MemberInfo instead of PropertyInfo. 15 years ago
craiggwilson 3ea3afac9f added fix for CSHARP-70 15 years ago
craiggwilson 3673d10cf7 added failing tests for CSHARP-70 15 years ago
rstam 9e0fa6d8c8 Fixed CSHARP-85. Merging pull request 12 with minor changes. 15 years ago
craiggwilson 70eb00927a fixed bug with id when discovery of id property is late. 15 years ago
craiggwilson 8023465860 refactored id generator convention to take a property info object instead of just a type. 15 years ago
craiggwilson c950c77b57 added id generator convention 15 years ago
rstam ef50bbefa1 Fixed CSHARP-78. Default UseCompactRepresentation to true for primitive properties. Added PushBookmark and PopBookmark to BsonReader to support reading ahead. Fixed handling of discriminators in BsonClassMapSerializer. FindString in BsonReader now actually moves the position (use bookmarks now to read ahead). 15 years ago
rstam 5024e87639 Changed BsonIdAttribute to take optional IdGenerator parameter. Changed PropertyMap to allow customizing the Id generator for a property. 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
rstam 923bdf58d8 Major overhaul of serialization machinery to support plugging in a new serialization provider. The default serialization support has been restructured as a plugin. See IBsonSerializationProvider and IBsonSerializer (as well as the BsonSerializer static class that handles registration and routing of serializers). 15 years ago
rstam f8ce7f6ad0 Implemented BsonDefaultValue, BsonDiscriminator, BsonElement, BsonId, BsonIgnore, BsonIgnoreIfNull, BsonRequired and BsonUseCompactRepresentation attributes and modified AutoMap to handle them (still need to modify BsonClassMapSerializer). 15 years ago
rstam 82652555e7 Added BsonUseCompactRepresentation attribute. Changed NetPrimitivePropertySerializers to honor UseCompactRepresentation. Changed unit tests to test UseCompactRepresentation. Improved detection of printable characters in BsonJsonWriter. Changed AutoMap to check for BsonUseCompactRepresentation attribute. 15 years ago
rstam 5ff64fbd91 Began work on supporting class maps for class hierarchies (including using a discriminator). Moved ToBson, ToBsonDocument and ToJson from BsonUtils to BsonExtensionMethods. 15 years ago
rstam 5f5f65eaf3 Initial (and partial) implementation of class map based object serialization. Added overload of BsonReader methods that take expectedName parameter. Fixed several small bugs. Deleted BsonPropertySerializer (it was obsoleted by BsonClassMapSerializer). 15 years ago