[release/7.0] Restore Advance when reading float/double with XmlBufferReader. #80321
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #80274 to release/7.0
Fixes #78913, #79056, and #79092
/cc @StephenMolloy
Customer Impact
A combination of performance and big-endian changes towards the end of 7.0 broke binary-deserialization of float/doubles in DataContractSerializer. Values are still serialized correctly, but 7.0 DCS clients fail when reading those primative types. The description on #80274 gets into more root-cause details.
Testing
Testing already existed for the correctness of the bytes being written and the order they get read back in... but that testing was targeted and shortcutted the buffered reader that DCS uses in end-to-end scenarios. This PR adds a quick round-trip check to our existing end-to-end DCS tests for most types.
Risk
Low. The change is small and represents an understood restoration of behavior from previous versions.