61 Commits (d2b72a19c93d73f3ac52a5b2f75eb3722d561fdd)

Author SHA1 Message Date
rstam d2b72a19c9 Implemented DictionaryGenericSerializer. 15 years ago
rstam dfd0a07b34 Implemented DictionarySerializer. 15 years ago
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 720b42e91b Added ByteArraySerializer so byte arrays are serialized as BsonBinary. Fixed bugs in BsonDocument handling of IdGenerators. 15 years ago
rstam 1ae3d36d20 Got BsonUnitTests to pass in mono. 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 0444845fe4 Changes to get serialization of structs to work. Some tests are still failing in deserialization (resolution pending). 15 years ago
rstam 13a011c88e BUMP 0.7.0.3959. 15 years ago
rstam 52de25c2ef Fixed CSHARP-78 unit test (and fixed SerializeElement for Int16Serializer). 15 years ago
rstam 0c6d76f338 Turns out no initialization at all is needed before deserializing instances of Animal subclasses when attributes are used to set the root class and known types. 15 years ago
rstam cb87ee541e Set AssemblyVersion to 0.7.0.*. 15 years ago
rstam 2cebee144e Finished implementing HierarchicalDiscriminatorConvention. Added IsRootClass and HasRootClass to BsonClassMap and added RootClass to BsonDiscriminatorAttribute. Changed DeserializeDocument in ObjectSerializer to look at the discriminator and delegate the deserialization to the serializer for the actual type. Changed the BsonKnownTypeAttribute to plural to allow specifying multiple known types in one attribute. 15 years ago
rstam 745dce7f9b Added support for serializing LinkedList<T>. 15 years ago
rstam 9a240bab8c Modified CollectionSerializerTests and CollectionSerializerGenericTests to be as similar as possible. Added unit tests for serializing HashSet<T>. 15 years ago
rstam e918733496 Consolidated collection serializers in CollectionSerializers.cs and CollectionSerializersGeneric.cs (and similarly for the unit tests). Added unit tests for more generic collection types. 15 years ago
rstam e709dd5675 Split out generic version of EnumerableSerializer into its own file. Added unit tests for EnumerableSerializer<T>. 15 years ago
rstam d733e05f33 Implemented StackSerializer. 15 years ago
rstam dea18ba040 Implemented QueueSerializer. Added EnumerableSerializerRegistration and QueueSerializerRegistration and modified BsonDefaultSerializationProvider to find registration methods for generic serializer definitions. 15 years ago
rstam 97aa952f5b Added support for Guid primitive type to EnumerableSerializer. Changed EnumerableSerializerTests to test properties of type ArrayList, ICollection and IEnumerable as well as IList. 15 years ago
rstam 660b6208d5 Fixed CSHARP-83. Implemented new EnumerableSerializer<T> generic serializer definition. Created a way to register and lookup generic serializer definitions and to instantiate closed generic serializers at runtime. 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 750efc62d2 Implemented NullableTypeSerializer. 15 years ago
rstam 1e03d90c07 Added no-argument constructor to BsonDiscriminatorAttribute. Modified SerializePolymorphicClassTests to test [BsonDiscriminatorOptions(Required = true)]. 15 years ago
rstam 118aaf16ae Added new BsonSerializationOptionsAttribute which serves as the base class for the existing BsonRepresentationAttribute and the new BsonDateTimeOptionsAttribute. Added DateTimeSerializationOptions to allow control over how DateTime values are serialized (representation, local/utc, dateOnly). Refactored AutoMapMember to process attributes in a loop. WriteDateTime in BsonWriter now checks that the value is in UTC (it is the job of the serializer to perform any needed conversions). 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 6a683cc5ac Minor renamings and reformattings. Moved CreateInstance and GetCreator up from BsonClassMap<TClass> to BsonClassMap (because it doesn't depend on TClass). 15 years ago
Testo 7f61ec789c - performance improvement 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 fdee1842e3 Fixed line endings. 15 years ago
rstam 3c02bed824 Merged in Ken Egozi's fix to CSHARP-86. Fixed line endings. 15 years ago
kenegozi 1572f90e0c tests improvements: TestDateTime was sensitive to the machine's timezone 15 years ago
rstam 1ac8ee762d Pulled and merged Craig Wilson's fix for CSHARP-70. 15 years ago
craiggwilson 2a749e62ba implemented field setting using reflection.emit. added tests. 15 years ago
craiggwilson 5ba15d2b6b changed attributes to allow them to be applied on fields. changed how automap discovers members to include non-default members that have a BsonElement attribute applied. 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 3673d10cf7 added failing tests for CSHARP-70 15 years ago
craiggwilson 297e1f7d80 added property finder convention. 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
craiggwilson 16494cf79e added IdPropertyConvention 15 years ago
craiggwilson 45cf2fbcc5 added convention profile and element name conventions 15 years ago
craiggwilson 9dcbb55b6b Implemented CombGuidGenerator and added unit tests for all the Id generators. 15 years ago
rstam c35dcfeabc Fixed CSHARP-81. The IdPropertyMap for a class map should come from the highest class possible in the inheritance hierarchy. 15 years ago