Skip to content

Commit 2f933a2

Browse files
author
rstam
committed
More proofreading of release notes and change logs.
1 parent e558391 commit 2f933a2

File tree

3 files changed

+26
-20
lines changed

3 files changed

+26
-20
lines changed

Release Notes/Change Log v1.4.1-Bson.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ BsonWriter.cs
1212
added private field _serializationDepth
1313
added public property SerializationDepth
1414
changed WriteEndArray to decrement _serializationDepth
15-
changed WriteEndDocument to increment _serializationDepth
15+
changed WriteEndDocument to decrement _serializationDepth
1616
changed WriteStartArray to increment _serializationDepth and check if it exceeds MaxSerializationDepth
1717
changed WriteStartDocument to increment _serializationDepth and check if it exceeds MaxSerializationDepth
1818

@@ -60,7 +60,7 @@ BsonJavaScriptWithScope.cs
6060
BsonRegularExpression.cs
6161
added checks for invalid null arguments
6262
changed constructor to not unescape "\" (if it's escaped it's because it needs to be)
63-
changed ToString to not escape "\" (it would already be escaped)
63+
changed ToString to not escape "\" (if it needed to be escaped it already would be)
6464

6565
BsonString.cs
6666
added checks for invalid null arguments
@@ -73,7 +73,7 @@ BsonSymbolTable.cs
7373

7474
BsonTypeMapper.cs
7575
changed MapToBsonValue to map null to BsonNull.Value
76-
added new MapToDotNetValue methods (maps from BsonValue to best matching .NET types)
76+
added new MapToDotNetValue methods (maps from BsonValue to the best matching .NET types)
7777
changed TryMapToBsonValue to map null to BsonNull.Value
7878

7979
BsonTypeMapperOptions.cs
@@ -112,7 +112,7 @@ BsonClassMap.cs
112112
changed FindMembers to support using BsonElement to opt-in serialization of read-only properties
113113

114114
BsonClassMapSerializer.cs
115-
changed Deserialize to ignore any values that were serialized for opted-in read-only properties
115+
changed Deserialize to ignore any values that correspond to opted-in read-only properties
116116
changed GetMemberSerializationInfo to check AllMemberMaps directly instead of calling GetMemberMap
117117
changed DeserializeExtraElement to use new MapToDotNetValue method when extra elements property is of type IDictionary<string, object>
118118
removed MapBsonValueToDotNetValue (use new MapToDotNetValue method of BsonTypeMapper instead)

Release Notes/Change Log v1.4.1-Driver.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
C# driver changes from 1.4 to 1.4.1
22

33
QueryBuilder.cs
4-
changed Or method to support empty queries (an empty query matches all documents)
4+
changed Or method to handle empty queries (an empty query matches all documents)
5+
note: the And method did not require any changes to handle empty queries
56

67
MongoCollection.cs
78
added checks for invalid null arguments
@@ -27,7 +28,7 @@ MongoGridFSSettings.cs
2728
added private field _verifyMD5
2829
added public property UpdateMD5
2930
added public property VerifyMD5
30-
changed Clone, Equal and GetHashCode to consider new fields
31+
changed Clone, Equal and GetHashCode to take new fields into account
3132

3233
MongoGridFSStream.cs
3334
added private field _fileIsDirty
@@ -54,7 +55,7 @@ MongoQueryTranslator.cs
5455
SelectQuery.cs
5556
added private field _ofType
5657
added public property OfType
57-
changed Execute to handle LINQ queries that included an OfType query operator
58+
changed Execute to handle LINQ queries that included an OfType<T> query operator
5859
changed Translate to handle bare AsQueryable (no Where clause or anything else)
5960
changed Translate to move switch statement on method name to new TranslateMethodCall method
6061
changed BuildArrayLengthQuery to handle constant on either side
@@ -66,14 +67,14 @@ SelectQuery.cs
6667
added private method BuildStringIndexQuery to support string[index] in LINQ queries
6768
added private method BuildStringLengthQuery to support string.Length in LINQ queries
6869
changed BuildStringQuery to allow combining ToLower/ToUpper/Trim/TrimStart/TrimEnd with Contains/StartsWith/EndsWith in LINQ queries
69-
added private method BuildTypeComparisonQuery to support x.GetType() == typeof(X) in LINQ queries
70-
added private method BuildTypeIsQuery to support x is X in LINQ queries
71-
changed CombinePredicateWithWhereClause to handle parameter type being changed by OfType query operator
70+
added private method BuildTypeComparisonQuery to support x.GetType() == typeof(T) in LINQ queries
71+
added private method BuildTypeIsQuery to support x is T in LINQ queries
72+
changed CombinePredicateWithWhereClause to handle parameter type being changed by OfType<T> query operator
7273
changed GetSerializationInfo to lookup serializer based on the parameter type (and not necessarily the document type)
7374
changed GetSerializationInfoMember to stop recursion when it gets to a parameter (which may or may not be of the document type)
7475
added private method GetTrimCharsPattern
7576
added private method TranslateMethodCall
76-
added private method TranslateOfType to support OfType query operator
77+
added private method TranslateOfType to support OfType<T> query operator
7778

7879
LinqExtensionMethods.cs
7980
added an overload of AsQueryable that can deduce the type of <T> from the collection parameter

Release Notes/Release Notes v1.4.1.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,7 @@ will now be mapped to a BsonNull. For example:
9292

9393
var dictionary = new Dictionary<string, object> { { "x", null } };
9494
var document = new BsonDocument(dictionary);
95-
96-
will result in the following BsonDocument:
97-
98-
var document = new BsonDocument { { "x", BsonNull.Value } };
95+
// document["x"] == BsonNull.Value
9996

10097
and when mapping in the reverse direction a BsonNull will map to a C# null:
10198

@@ -109,6 +106,7 @@ can access the BsonTypeMapper directly:
109106

110107
var dictionary = new Dictionary<string, object> { { "x", null } };
111108
var document = BsonTypeMapper.MapToBsonValue(dictionary);
109+
// document["x"] == BsonNull.Value
112110

113111
or in the other direction:
114112

@@ -167,10 +165,10 @@ file. You can also disable the client side verification of the MD5 that is
167165
normally done on Upload or Download. The reason you might choose to disable
168166
MD5 verification is that it is computationally expensive to compute the MD5.
169167

170-
LINQ OfType query operator
171-
--------------------------
168+
LINQ OfType\<T\> query operator
169+
-------------------------------
172170

173-
You can now use the OfType<T> query operator in LINQ queries. For example:
171+
You can now use the OfType\<T\> query operator in LINQ queries. For example:
174172

175173
var query = collection.AsQueryable<B>().OfType<C>();
176174

@@ -223,8 +221,15 @@ The following expressions are now supported in LINQ where clauses:
223221
// you can use any combination of ToLower/ToUpper/Trim/TrimStart/TrimEnd
224222
// before Contains/StartsWith/EndsWith
225223

226-
Type of <T> in AsQueryable can now be deduced
227-
---------------------------------------------
224+
In the 1.4 version of the C# driver the constant always had to appear on the
225+
right of a comparison operator. That restriction is lifted in 1.4.1 so now the
226+
following are equivalent:
227+
228+
where d.Height < 60
229+
where 60 > d.Height
230+
231+
Type of \<T\> in AsQueryable can now be deduced
232+
-----------------------------------------------
228233

229234
The type of \<T\> in the call to AsQueryable can now be deduced from the collection argument:
230235

0 commit comments

Comments
 (0)