-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve XmlSerializationWriter.WriteTypedPrimitive (#76436)
* Introduce TryFormats for almost all primitive types * Use primitive char buffer in XmlSerializationWriter * Fix char cast * Add tests for different types * Add byte type * Address feedback * Fix tests * remove using * Increase duration char buffer size as it is not enough for TimeSpan.Max/Min * Address feedback * Added assert if we cannot format primitive value to the suppiled buffer * Lazy create primitives buffer * Address new feadback * Resolve feedback * Optimize float and double TryFormat * Replace ArrayPool renting with Interlocked. Fix Debug.Assert * Do not expect concurrency when using primitives buffer --------- Co-authored-by: Traian Zaprianov <[email protected]>
- Loading branch information
1 parent
5eeb91f
commit b79adc5
Showing
6 changed files
with
308 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.