Skip to content

Commit 38525fd

Browse files
author
rstam
committed
Initial draft of 1.5 release notes (more work remaining).
1 parent 8dbd797 commit 38525fd

File tree

4 files changed

+398
-0
lines changed

4 files changed

+398
-0
lines changed

CSharpDriver-2010.sln

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Release Notes", "Release No
2626
Release Notes\Change Log v1.4.1-Driver.txt = Release Notes\Change Log v1.4.1-Driver.txt
2727
Release Notes\Change Log v1.4.2-Bson.txt = Release Notes\Change Log v1.4.2-Bson.txt
2828
Release Notes\Change Log v1.4.2-Driver.txt = Release Notes\Change Log v1.4.2-Driver.txt
29+
Release Notes\Change Log v1.5-Bson.txt = Release Notes\Change Log v1.5-Bson.txt
30+
Release Notes\Change Log v1.5-Driver.txt = Release Notes\Change Log v1.5-Driver.txt
2931
Release Notes\Release Notes v0.11.txt = Release Notes\Release Notes v0.11.txt
3032
Release Notes\Release Notes v0.7.txt = Release Notes\Release Notes v0.7.txt
3133
Release Notes\Release Notes v0.9.txt = Release Notes\Release Notes v0.9.txt
@@ -37,6 +39,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Release Notes", "Release No
3739
Release Notes\Release Notes v1.4.1.md = Release Notes\Release Notes v1.4.1.md
3840
Release Notes\Release Notes v1.4.2.md = Release Notes\Release Notes v1.4.2.md
3941
Release Notes\Release Notes v1.4.md = Release Notes\Release Notes v1.4.md
42+
Release Notes\Release Notes v1.5.md = Release Notes\Release Notes v1.5.md
4043
EndProjectSection
4144
EndProject
4245
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DriverUnitTestsVB", "DriverUnitTestsVB\DriverUnitTestsVB.vbproj", "{19ED9AD5-A2CA-4F1B-9BE4-96450382F404}"
Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
BSON library changes from 1.4.2 to 1.5
2+
3+
BsonBinaryReader.cs
4+
ReadBsonType now navigates a trie and returns a value from it while reading the element name
5+
6+
BsonBuffer.cs
7+
added a static field for an ASCII table
8+
added a static field for a UTF8Encoding instance (constructed to throw exceptions on invalid bytes)
9+
ReadString uses new DecodeUtf8String helper method
10+
ReadCString now navigates a trie and returns a value from it while reading the string
11+
new IndexOfNull helper method navigates a trie while scanning for the null byte
12+
13+
BsonDocumentReader.cs
14+
ReadBsonType now navigates a trie and returns a value from it while reading the element name
15+
16+
BsonReader.cs
17+
ReadBsonType now navigates a trie and returns a value from it while reading the element name
18+
19+
BsonTrie.cs
20+
new class that implements the trie used by BsonReader and its subclasses
21+
22+
JsonReader.cs
23+
ReadBsonType now navigates a trie and returns a value from it while reading the element name
24+
25+
BsonDocumentWrapper.cs
26+
refactored constructors to delegate construction to one main constructor
27+
C# null is now wrapped instead of ignored
28+
29+
BsonValue.cs
30+
IConvertible.ToString now knows how to convert BsonObjectId to string
31+
IConvertible.ToType now knows how to convert BsonObjectId to string
32+
33+
ObjectId.cs
34+
use zero for Pid when medium trust prohibits getting the actual PID
35+
TryParse returns false instead of throwing an exception when string argument is null
36+
37+
BsonDefaultAttribute.cs
38+
BsonDiscriminatorAttribute.cs
39+
BsonElementAttribute.cs
40+
BsonExtraElementsAttribute.cs
41+
BsonIdAttribute.cs
42+
BsonIgnoreIfDefaultAttribute.cs
43+
BsonIgnoreIfNullAttribute.cs
44+
BsonRequiredAttribute.cs
45+
now only derives from Attribute instead of from BsonSerializationOptionsAttribute
46+
implements the Apply method from the new IBsonMemberMapModifier interface
47+
48+
BsonDiscriminatorAttribute.cs
49+
BsonIgnoreExtraElementsAttribute.cs
50+
BsonKnownTypesAttribute.cs
51+
now only derives from Attribute instead of from BsonSerializationOptionsAttribute
52+
implements the Apply method from the new IBsonClassMapModifier interface
53+
54+
BsonIgnoreAttribute.cs
55+
now only derives from Attribute instead of from BsonSerializationOptionsAttribute
56+
57+
BsonSerializationOptionsAttribute.cs
58+
the class is not new but it is used in a different way
59+
it is no longer the base class for all other serialization attributes
60+
it is now only the base class for attributes which supply serialization options
61+
62+
DiscriminatorConvention.cs
63+
only call Type.IsAssignable if initial fast check is inconclusive
64+
65+
ArraySerializationOptions.cs
66+
ApplyAttribute changed slightly as required by new IBsonArraySerializer interface
67+
68+
DictionarySerializationOptions.cs
69+
added KeyValuePairSerializationOptions
70+
deprecated ItemSerializationOptions (use KeyValuePairSerializationOptions instead)
71+
changed ApplyAttribute to support new KeyValuePairSerializationOptions
72+
73+
KeyValuePairSerializationOptions.cs
74+
new class
75+
has Representation property that controls the representation used for key/value pairs
76+
has KeySerializationOptions property with serialization options for the key
77+
has ValueSerializationOptions property with serialization options for the value
78+
79+
ArraySerializer.cs
80+
implements the new IBsonArraySerializer interface
81+
Deserialize now passes item serialization options down when deserializing the items
82+
83+
BsonBaseSerializer.cs
84+
no longer implements GetDocumentId/SetDocumentId (they were moved to the new IBsonIdProvider interface)
85+
no longer implements GetItemSerializationInfo (it was moved to the new IBsonArraySerializer interface)
86+
no longer implements GetMemberSerializationInfo (it was moved to the new IBsonDocumentSerializer interface)
87+
only call Type.IsAssignable if initial fast check is inconclusive
88+
89+
BsonIBsonSerializableSerializer.cs
90+
implements the new IBsonIdProvider interface
91+
no longer implements GetItemSerializationInfo (it was moved to the new IBsonArraySerializer interface)
92+
no longer implements GetMemberSerializationInfo (it was moved to the new IBsonDocumentSerializer interface)
93+
94+
BsonValue.cs
95+
BsonDocumentSerializer implements the new IBsonIdProvider interface
96+
97+
CollectionGenericSerializers.cs
98+
the various serializers implement the new IBsonArraySerializer interface
99+
Deserialize now passes item serialization options down when deserializing the items
100+
Deserialize now calls CreateInstance helper method because the serializer now is used with any type that implements IEnumerable<T>
101+
102+
CollectionSerializers.cs
103+
the various serializers implement the new IBsonArraySerializer interface
104+
Deserialize now passed item serialization options down when deserializing the items
105+
Deserialize now calls CreateInstance helper method because the serializer now is used with any type that implements IEnumerable
106+
107+
DictionaryGenericSerializer.cs
108+
changed to use the new KeyValuePairSerializer
109+
Deserialize now passes the key value pair serialization options down when deserializing the key value pairs
110+
no longer implements GetItemSerializationInfo (which only applies to arrays)
111+
CreateInstance was modified since this serializer is now used with any type that implements IDictionary<TKey, TValue>
112+
113+
DictionarySerializer.cs
114+
changed to use the new KeyValuePairSerializer
115+
Deserialize now passes the key value pair serialization options down when deserializing the key value pairs
116+
no longer implements GetItemSerializationInfo (which only applies to arrays)
117+
CreateInstance was modified since this serializer is now used with any type that implements IDictionary
118+
119+
KeyValuePairSerializer.cs
120+
new class
121+
122+
ObjectSerializer.cs
123+
no longer implements GetDocumentId/SetDocumentId (they were moved to the new IBsonIdProvider interface)
124+
no longer implements GetItemSerializationInfo (it was moved to the new IBsonArraySerializer interface)
125+
no longer implements GetMemberSerializationInfo (it was moved to the new IBsonDocumentSerializer interface)
126+
127+
BsonClassMap.cs
128+
now caches the discriminator convention so LookupDiscriminatorConvention is only called once
129+
now caches a read-only copy of the allMemberMaps list
130+
Freeze now builds a trie of all the element names (used during deserialization)
131+
GetMemberMapForElement now consults the trie instead of a dictionary
132+
SetCreator can be called to inject an object instance creator delegate
133+
new AddKnownType method is called during AutoMapping of a class
134+
AutoMapClass handling of attributes is much simpler thanks to the new IBsonClassMapModifier interface
135+
AutoMapMembers handles mix of ordered and unordered members more efficiently
136+
AutoMapMember handling of attributes is much simpler thanks to the new IBsonMemberMapModifier interface
137+
138+
BsonClassMapSerializationProvider.cs
139+
a new IBsonSerializationProvider just for BsonClassMap based serializers
140+
this functionality used to be part of BsonDefaultSerializer (now called BsonDefaultSerializationProvider)
141+
142+
BsonClassMapSerializer
143+
class is now internal
144+
class now implements IBsonIdProvider and IBsonDocumentSerializer
145+
Deserialize has much more efficient detection of missing elements
146+
no longer implements GetItemSerializationInfo (it was moved to the new IBsonArraySerializer interface)
147+
FastMemberMapHelper nested class hosts new GetLeastSignificantBit helper method
148+
149+
BsonDefaultSerializationProvider.cs
150+
used to be called BsonDefaultSerializer
151+
methods that weren't strictly related to being a serialization provider have been moved elsewhere
152+
moved EnsureKnownTypesAreRegister method to BsonSerializer
153+
moved IsTypeDiscriminated method to BsonSerializer
154+
moved LookupActualType method to BsonSerializer
155+
moved LookupDiscriminatorConvention to BsonSerializer
156+
moved RegisterDiscriminator to BsonSerializer
157+
moved RegisterDiscriminatorConvention to BsonSerializer
158+
now chooses DictionaryGenericSerializer for any class that implements IDictionary<TKey, TValue>
159+
now chooses DictionarySerializer for any class that implements IDictionary
160+
now chooses CollectionGenericSerializer for any class that implements IEnumerable<T>
161+
now chooses CollectionSerializer for any class that implements IEnumerable
162+
no longer handles BsonClassMap based serializers (see BsonClassMapSerializationProvider)
163+
164+
BsonDefaultSerializer.cs
165+
was renamed BsonDefaultSerializationProvider
166+
167+
BsonMemberMap.cs
168+
now caches the discriminator convention
169+
now caches the serializer
170+
now only applies a default value if one was actually provided
171+
172+
BsonSerializer.cs
173+
moved EnsureKnownTypesAreRegister method here from BsonDefaultSerializer
174+
moved IsTypeDiscriminated method here from BsonDefaultSerializer
175+
moved LookupActualType method here from BsonDefaultSerializer
176+
moved LookupDiscriminatorConvention method here from BsonDefaultSerializer
177+
moved RegisterDiscriminator method here from BsonDefaultSerializer
178+
moved RegisterDiscriminatorConvention method here from BsonDefaultSerializer
179+
LookupSerializer doesn't need to do a lookup if type implements IBsonSerializable
180+
RegisterSerializer doesn't allow you to register a serializer for a type that implements IBsonSerializable (we always assumed you wouldn't but now we enforce it)
181+
RegisterSerializer doesn't let you change the serializer for a type (i.e., once you register a serializer for a type it can't be changed)
182+
RegisterDefaultSerializationProviders now has to register two providers (there's the new BsonClassMapSerializationProvider)
183+
184+
IBsonArraySerializer.cs
185+
new interface for serializers that serialize values as arrays
186+
the GetItemSerializationInfo method was moved here from IBsonSerializer
187+
188+
IBsonClassMapModifier.cs
189+
new interface implemented by serialization attributes that apply to classes
190+
191+
IBsonDocumentSerializer.cs
192+
new interface for serializers that serialize values as documents
193+
the GetMemberSerializationInfo method was moved here from IBsonSerializer
194+
195+
IBsonIdProvider.cs
196+
new interface for serializers that serialize values as documents that contain an _id
197+
the GetDocumentId/SetDocumentId methods were moved here from IBsonSerializer
198+
199+
IBsonMemberMapModifier.cs
200+
new interface implemented by serialization attributes that apply to members
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
C# driver changes from 1.4.2 to 1.5
2+
3+
DeprecatedQueryBuilder.cs
4+
used to be called QueryBuilder.cs
5+
holds the now deprecated old Query builder
6+
7+
FieldsBuilder.cs
8+
added new typed Fields<TDocument> builder
9+
10+
GeoHaystackSearchOptionsBuilder.cs
11+
added new typed GeoHaystackSearchOptions<TDocument> builder
12+
13+
GroupByBuilder.cs
14+
added new typed GroupBy<TDocument> builder
15+
16+
IndexKeysBuilder.cs
17+
added new typed IndexKeys<TDocument> builder
18+
19+
QueryBuilder.cs
20+
contains the new simpler untyped Query builder
21+
22+
QueryBuilderTyped.cs
23+
contains the new typed Query<TDocument> builder
24+
25+
SortByBuilder.cs
26+
added new typed SortBy<TDocument> builder
27+
28+
UpdateBuilder.cs
29+
AddToSetWrapped value parameter now wraps C# null
30+
PullWrapped value parameter now wraps C# null
31+
PushWrapped value parameter now wraps C# null
32+
SetWrapped value parameter now wraps C# null
33+
added new typed Update<TDocument> builder
34+
35+
MongoCollection.cs
36+
some changes because BsonDocumentWrapper no longer ignores C# null
37+
InsertBatch changed to use new IBsonIdProvider interface
38+
Save changed to use new IBsonIdProvider interface
39+
40+
MongoConnectionStringBuilder.cs
41+
added support for new journal and uuidRepresentation options (j and guids still supported for backward compatibility)
42+
fixed some bugs
43+
44+
MongoCollection.cs
45+
some changes because BsonDocumentWrapper no longer ignores C# null
46+
47+
MongoDatabase.cs
48+
RunCommandAs now uses { name : 1 } instead of { name : true } for better compatibility with server
49+
50+
MongoDBRef.cs
51+
implements new IBsonDocumentSerializer interface
52+
53+
MongoServer.cs
54+
VerifyState now iterates over a copy of the instances collection because collection can change while verifying states
55+
VerifyUnknownStates now iterates over a copy of the instances collection because collection can change while verifying unknown states
56+
57+
MongoUrlBuilder.cs
58+
added support for new journal and uuidRepresentation options (j and guids still supported for backward compatibility)
59+
60+
SafeMode.cs
61+
renamed J property Journal to match connection string option (J still supported for backward compatibility)
62+
63+
SystemProfileInfo.cs
64+
implements the new IBsonDocumentSerializer interface
65+
fixed a bug in Deserialize (values for unknown fields weren't being skipped properly)
66+
67+
MongoGridFS.cs
68+
EnsureIndexes is now only called for write operations, so read-only users can download GridFS files without getting an exception
69+
several methods changed to use long instead of int for some variables to support GridFS files larger than 2GB
70+
71+
MongoGridFSFileInfo.cs
72+
EnsureIndexes is now only called for write operations, so read-only users can download GridFS files without getting an exception
73+
74+
MongoGridFSStream.cs
75+
EnsureIndexes is now only called for write operations, so read-only users can download GridFS files without getting an exception
76+
several methods changed to use long instead of int for some variables to support GridFS files larger than 2GB
77+
78+
ExpressionFormatter.cs
79+
VisitConstant now identifies Nullable<T> constants with a cast
80+
many places that were using type.Name now use FriendlyTypeName(type) to ensure consistent type names
81+
FriendlyTypeName uses a consistent platform neutral name for anonymous types to facilitate cross platform testing
82+
VisitValue now handles nulls
83+
84+
ExpressionNormalizer.cs
85+
new class that changes expressions into a normalized form
86+
initially introduced to handle differences between VB.NET and C# LINQ queries
87+
also transforms expressions so constant is always on the right
88+
89+
ExpressionParameterFinder.cs
90+
removed because it is no longer used
91+
92+
ExpressionVisitorGeneric.cs
93+
a variant of ExpressionVisitor that returns a result instead of a modified Expression
94+
95+
MongoQueryTranslator.cs
96+
Translate now calls ExpressionNormalizer.Normalize before translating the expression
97+
98+
PartialEvaluator.cs
99+
moved functionality of CanBeEvaluatedLocally method here from MongoQueryProvider
100+
101+
PredicateTranslator.cs
102+
new class that contains all the BuildQuery methods moved here from SelectQuery
103+
added support for & and | operators in LINQ queries (as long as arguments are bools)
104+
added support for Any<T>(source, predicate) in LINQ queries
105+
new BuildBooleanQuery to build always true and always false queries ({ } and { _id : { $type : -1 } } respectively)
106+
added support for true and false constants in LINQ queries
107+
added support for using ToLower/ToUpper to do case insensitive LINQ queries
108+
added support for nullable enums in LINQ queries
109+
added support for ContainsKey in LINQ queries
110+
added support for Contains as another way of expressing In in LINQ queries (In is propietary, Contains is not)
111+
added support for type comparisons in LINQ queries (== and != only of course)
112+
moved bulk of BuildNotQuery logic to new Query.Not builder method
113+
114+
SelectQuery.cs
115+
moved BuildQuery and all helper methods to PredicateTranslator
116+
moved all SerializationInfo helper methods to BsonSerializationInfoFinder or BsonSerializationInfoHelper
117+
added support for projections after OfType in LINQ queries
118+
119+
BsonSerializationInfoFinder.cs
120+
new home for the GetSerializationInfo method that used to be in SelectQuery
121+
reimplemented GetSerializationInfo and related helper methods as an ExpressionVisitor
122+
123+
BsonSerializationInfoHelper.cs
124+
new home for some of the SerializationInfo methods that used to be in SelectQuery
125+
126+
TypeHelper.cs
127+
changed namespace
128+
129+
MongoQueryProvider.cs
130+
moved CanBeEvaluatedLocally functionality to method of the same name in PartialEvaluator
131+
132+
DriverSetup
133+
project removed (see new Installer project)
134+
135+
Installer
136+
new WIX based installer
137+
138+
CSharpDriver-Mono.sln
139+
new solution that is the same as CSharpDriver-2010.sln but without the VB unit tests project
140+
141+
CSharpDriverSetup-2010.sln
142+
replaced DriverSetup project with new WIX based Installer project

0 commit comments

Comments
 (0)