|
| 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 |
0 commit comments