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 |
Brian Knight
|
413e39af3a
|
Resolved CSHARP-310: Changed member mapping to use the SerializeDefaultValue in the map instead of the default.
|
14 years ago |
rstam
|
85b0d3d4c5
|
Implemented CSHARP-317 (support j=true and w=mode SafeModes). SafeMode now has too many properties to be immutable, so it now only becomes immutable after Freeze is called, allowing easier initialization of SafeMode values. Added J and WMode properties to SafeMode. Replaced most calls to Freeze with calls to the new method FrozenCopy, which calls Freeze on a Copy instead of the original. Added new constructors to MongoDatabaseSettings and MongoCollectionSettings that allow inheriting values from the containing server and database (using a constructor instead of CreateDatabaseSettings and CreateCollectionSettings allows use of object initialization syntax). Added support for j=true and w=mode to MongoConnectionStringBuilder and MongoUrlBuilder. Added support for j=true and w=mode to GetLastError command created in MongoConnection.SendMessage. Added unit tests.
|
14 years ago |
rstam
|
4508a86ea0
|
Fixed CSHARP-293. Added additional information to the error message when the same element name is used more than once in a class map.
|
14 years ago |
rstam
|
58dd471dc4
|
Implemented CSHARP-272. Changed BsonSerializer.ConfigLock to a ReaderWriterSlimLock to increase concurrency.
|
14 years ago |
rstam
|
53dcc56e57
|
These changes mirror the changes made yesterday to the BsonWriters. Consolidated BsonBaseReader into BsonReader. Added abstract base class BsonReaderSettings to hold settings common to all readers.
|
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 |
saleemjavid
|
950b293fcd
|
The changes for ShouldSerializeXXX implementation
|
14 years ago |
rstam
|
c20cdf8663
|
Implemented BsonClassMap.IsClassMapRegistered.
|
14 years ago |
rstam
|
25e15a19be
|
Further work on CSHARP-188. The three thread-safe serialization classes (BsonSerializer, BsonDefaultSerializer and BsonClassMap) now share a single static ConfigLock, which should make deadlocks between them impossible now.
|
15 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
|
25d48233b6
|
Changed RegisterConventions so new conventions are added to the front of the list.
|
15 years ago |
rstam
|
f16ab659a9
|
Removed UnregisterConventions, UnregisterGenericSerializerDefinition, UnregisterIdGenerator and UnregisterSerializer. All serialization configuration must happen once at program startup and remain static thereafter, so Unregister methods are not appropriate.
|
15 years ago |
rstam
|
60c589cfec
|
Fixed CSHARP-180. Improved error message.
|
15 years ago |
rstam
|
92f1a8da09
|
Added and tweaked some doc comments here and there.
|
15 years ago |
rstam
|
011103d803
|
Added doc comments to BsonClassMap.
|
15 years ago |
rstam
|
1d6e9a9c0c
|
Added Freeze method to BsonBinaryReaderSettings, BsonBinaryWriterSettings and JsonWriterSettings. Made small changes throughout so that Freeze method is used consistently.
|
15 years ago |
rstam
|
c4dd46d35d
|
Added BsonExtraElementsAttribute and ExtraElementsMemberConvention classes. Added ExtraElementMemberMap property and several ExtraElements related methods to BsonClassMap. Modified BsonClassMapSerializer to handle extra elements.
|
15 years ago |
rstam
|
b552f5e394
|
Updated copyright notices.
|
15 years ago |
rstam
|
306aad67b5
|
Removed UnregisterClassMap. Unregistering a class map should not be allowed for the same reason that a class map can't be replaced (because subclasses might already be referring to it).
|
15 years ago |
rstam
|
f38832d8b2
|
Implemented CSHARP-108. Added UnmapField, UnmapMember and UnmapProperty (replacing IgnoreField, IgnoreMember and IgnoreProperty; the new names are much better).
|
15 years ago |
rstam
|
6304df123a
|
Fixed CSHARP-122. Allow BsonClassMap to have more than one member of the same name (possible if a member in a subclass hides a base class member) as long as the element names are different. Changed MapMember to check for an existing map and return it before creating a new one.
|
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
|
222235e593
|
Oops. Need to call RegisterDiscriminator from RegisterClassMap (Freeze is too late).
|
15 years ago |
rstam
|
d39afbf0d8
|
Added the concept of "freezing" a BsonClassMap. Once frozen no further changes are allowed on a class map, and Freeze is also a good place for the final initialization steps of a class map. A class map is frozen the first time LookupClassMap is called for that type. When a class map is frozen, class maps for all base classes in the inheritance tree are frozen also. Furthermore, when a class map is frozen, the class maps of all of its "known types" will be frozen also, but look at the code for the queued processing of known types needed to avoid recursion problems. Look at the changed/fixed unit tests to see the types of bugs that these changes fix.
|
15 years ago |
rstam
|
4392a7709e
|
Fixed CSHARP-102. Changed FindMembers in PublicMemberFinderConvention to skip indexers.
|
15 years ago |
rstam
|
404bea2a74
|
Fixed CSHARP-101. Save now works correctly with or without an IdGenerator. Replaced DocumentHasIdMember/DocumentHasIdValue with GetDocumentId and GenerateDocumentId with SetDocumentId. The whole logic around using IdGenerators should be easier to follow and be more robust now.
|
15 years ago |
rstam
|
785aff6920
|
A slightly more direct way of automatically creating a class map when LookupClassMap is called and it doesn't already exist.
|
15 years ago |
rstam
|
1ae3d36d20
|
Got BsonUnitTests to pass in mono.
|
15 years ago |
rstam
|
202716383a
|
Implemented IgnoreField and IgnoreProperty.
|
15 years ago |
rstam
|
7505ec6987
|
A profiling test of deserialization showed that 34% of all CPU time was spent in GetMemberMapForElement in BsonClassMap. Reduced that to 4% by moving some work to LoadBaseClassMap and by adding dictionaries to lookup member maps by memberName or elementName.
|
15 years ago |
rstam
|
d91148cac4
|
Minor changes.
|
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
|
c45d4d052d
|
Relax the restriction that a class must have a public default constructor in order to be deserialized (now a default constructor, public or private, will be used if it exists, otherwise FormatterServices.GetUninitializedObject will be used to create a zero filled instance).
|
15 years ago |
rstam
|
748dfb3468
|
Added DiscriminatorConventions to allow more flexibility in how discriminators are used. Includes partial support for hierarchical discriminators (but a little more work is required to know when hierarchical discriminators should be used and where the hierarchy should be rooted).
|
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
- correct implementation of anonymous class
|
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
|
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
|
297e1f7d80
|
added property finder convention.
|
15 years ago |