From 2f933a2a41c49338ceb516e46833c9eb7efe4c87 Mon Sep 17 00:00:00 2001 From: rstam Date: Tue, 17 Apr 2012 16:42:47 -0400 Subject: [PATCH] More proofreading of release notes and change logs. --- Release Notes/Change Log v1.4.1-Bson.txt | 8 ++++---- Release Notes/Change Log v1.4.1-Driver.txt | 15 +++++++------- Release Notes/Release Notes v1.4.1.md | 23 +++++++++++++--------- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/Release Notes/Change Log v1.4.1-Bson.txt b/Release Notes/Change Log v1.4.1-Bson.txt index 67e47e976b2..54b7727be9b 100644 --- a/Release Notes/Change Log v1.4.1-Bson.txt +++ b/Release Notes/Change Log v1.4.1-Bson.txt @@ -12,7 +12,7 @@ BsonWriter.cs added private field _serializationDepth added public property SerializationDepth changed WriteEndArray to decrement _serializationDepth - changed WriteEndDocument to increment _serializationDepth + changed WriteEndDocument to decrement _serializationDepth changed WriteStartArray to increment _serializationDepth and check if it exceeds MaxSerializationDepth changed WriteStartDocument to increment _serializationDepth and check if it exceeds MaxSerializationDepth @@ -60,7 +60,7 @@ BsonJavaScriptWithScope.cs BsonRegularExpression.cs added checks for invalid null arguments changed constructor to not unescape "\" (if it's escaped it's because it needs to be) - changed ToString to not escape "\" (it would already be escaped) + changed ToString to not escape "\" (if it needed to be escaped it already would be) BsonString.cs added checks for invalid null arguments @@ -73,7 +73,7 @@ BsonSymbolTable.cs BsonTypeMapper.cs changed MapToBsonValue to map null to BsonNull.Value - added new MapToDotNetValue methods (maps from BsonValue to best matching .NET types) + added new MapToDotNetValue methods (maps from BsonValue to the best matching .NET types) changed TryMapToBsonValue to map null to BsonNull.Value BsonTypeMapperOptions.cs @@ -112,7 +112,7 @@ BsonClassMap.cs changed FindMembers to support using BsonElement to opt-in serialization of read-only properties BsonClassMapSerializer.cs - changed Deserialize to ignore any values that were serialized for opted-in read-only properties + changed Deserialize to ignore any values that correspond to opted-in read-only properties changed GetMemberSerializationInfo to check AllMemberMaps directly instead of calling GetMemberMap changed DeserializeExtraElement to use new MapToDotNetValue method when extra elements property is of type IDictionary removed MapBsonValueToDotNetValue (use new MapToDotNetValue method of BsonTypeMapper instead) diff --git a/Release Notes/Change Log v1.4.1-Driver.txt b/Release Notes/Change Log v1.4.1-Driver.txt index 8f698c130ad..9e9a4b9abaa 100644 --- a/Release Notes/Change Log v1.4.1-Driver.txt +++ b/Release Notes/Change Log v1.4.1-Driver.txt @@ -1,7 +1,8 @@ C# driver changes from 1.4 to 1.4.1 QueryBuilder.cs - changed Or method to support empty queries (an empty query matches all documents) + changed Or method to handle empty queries (an empty query matches all documents) + note: the And method did not require any changes to handle empty queries MongoCollection.cs added checks for invalid null arguments @@ -27,7 +28,7 @@ MongoGridFSSettings.cs added private field _verifyMD5 added public property UpdateMD5 added public property VerifyMD5 - changed Clone, Equal and GetHashCode to consider new fields + changed Clone, Equal and GetHashCode to take new fields into account MongoGridFSStream.cs added private field _fileIsDirty @@ -54,7 +55,7 @@ MongoQueryTranslator.cs SelectQuery.cs added private field _ofType added public property OfType - changed Execute to handle LINQ queries that included an OfType query operator + changed Execute to handle LINQ queries that included an OfType query operator changed Translate to handle bare AsQueryable (no Where clause or anything else) changed Translate to move switch statement on method name to new TranslateMethodCall method changed BuildArrayLengthQuery to handle constant on either side @@ -66,14 +67,14 @@ SelectQuery.cs added private method BuildStringIndexQuery to support string[index] in LINQ queries added private method BuildStringLengthQuery to support string.Length in LINQ queries changed BuildStringQuery to allow combining ToLower/ToUpper/Trim/TrimStart/TrimEnd with Contains/StartsWith/EndsWith in LINQ queries - added private method BuildTypeComparisonQuery to support x.GetType() == typeof(X) in LINQ queries - added private method BuildTypeIsQuery to support x is X in LINQ queries - changed CombinePredicateWithWhereClause to handle parameter type being changed by OfType query operator + added private method BuildTypeComparisonQuery to support x.GetType() == typeof(T) in LINQ queries + added private method BuildTypeIsQuery to support x is T in LINQ queries + changed CombinePredicateWithWhereClause to handle parameter type being changed by OfType query operator changed GetSerializationInfo to lookup serializer based on the parameter type (and not necessarily the document type) changed GetSerializationInfoMember to stop recursion when it gets to a parameter (which may or may not be of the document type) added private method GetTrimCharsPattern added private method TranslateMethodCall - added private method TranslateOfType to support OfType query operator + added private method TranslateOfType to support OfType query operator LinqExtensionMethods.cs added an overload of AsQueryable that can deduce the type of from the collection parameter diff --git a/Release Notes/Release Notes v1.4.1.md b/Release Notes/Release Notes v1.4.1.md index 90957ba53bf..cb5e2ddb357 100644 --- a/Release Notes/Release Notes v1.4.1.md +++ b/Release Notes/Release Notes v1.4.1.md @@ -92,10 +92,7 @@ will now be mapped to a BsonNull. For example: var dictionary = new Dictionary { { "x", null } }; var document = new BsonDocument(dictionary); - -will result in the following BsonDocument: - - var document = new BsonDocument { { "x", BsonNull.Value } }; + // document["x"] == BsonNull.Value and when mapping in the reverse direction a BsonNull will map to a C# null: @@ -109,6 +106,7 @@ can access the BsonTypeMapper directly: var dictionary = new Dictionary { { "x", null } }; var document = BsonTypeMapper.MapToBsonValue(dictionary); + // document["x"] == BsonNull.Value or in the other direction: @@ -167,10 +165,10 @@ file. You can also disable the client side verification of the MD5 that is normally done on Upload or Download. The reason you might choose to disable MD5 verification is that it is computationally expensive to compute the MD5. -LINQ OfType query operator --------------------------- +LINQ OfType\ query operator +------------------------------- -You can now use the OfType query operator in LINQ queries. For example: +You can now use the OfType\ query operator in LINQ queries. For example: var query = collection.AsQueryable().OfType(); @@ -223,8 +221,15 @@ The following expressions are now supported in LINQ where clauses: // you can use any combination of ToLower/ToUpper/Trim/TrimStart/TrimEnd // before Contains/StartsWith/EndsWith -Type of in AsQueryable can now be deduced ---------------------------------------------- +In the 1.4 version of the C# driver the constant always had to appear on the +right of a comparison operator. That restriction is lifted in 1.4.1 so now the +following are equivalent: + + where d.Height < 60 + where 60 > d.Height + +Type of \ in AsQueryable can now be deduced +----------------------------------------------- The type of \ in the call to AsQueryable can now be deduced from the collection argument: