Replace 2 allocations from string.ToCharArray() with ReadOnlySpan in System.Private...
authorTrayan Zapryanov <lrt80@abv.bg>
Fri, 8 Apr 2022 08:22:37 +0000 (11:22 +0300)
committerGitHub <noreply@github.com>
Fri, 8 Apr 2022 08:22:37 +0000 (10:22 +0200)
commite6c8d42cd6b4d6fb7dc35b7a02ff208e665e6cb0
treee868c359c58b7568d291659599aacb36650d2109
parent9cb6475516b94aff3d35c67eab579ceb351899b9
Replace 2 allocations from string.ToCharArray() with ReadOnlySpan in System.Private.Xml library (#67002)

* Remove ToCharArray() used in BinHexDecoder

* Replace ToCharArray() used in XmlSerializationReader with Span

* Address feedback

* Remove not necessary check for null

* Remove OutOfMemoryException catch

Co-authored-by: Trayan Zapryanov <Traian.Zaprianov@docuware.com>
src/libraries/System.Private.Xml/src/System/Xml/BinHexDecoder.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReader.cs
src/libraries/System.Private.Xml/src/System/Xml/XmlConvert.cs