Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
2.7.0
-
None
-
Minor Change
Description
ReadName() will read bson-type if there is one at current position and read the name.
SkipName() does not read bson-type and will only skip the name.
In short: a user of SkipName() likely wants to skip the BsonReaderState.Type also.
I think it would be better if SkipName() would internally check if there is a bson type to read and if the bson-type is not equal name description it might throw an error.
It should just skip the name description bson-type, because that is what one would suspect if using this api.
One has to replace ReadName() with ReadType() and SkipName().