SqlClient spanify netcore guid writes (dotnet/corefx#34390)
authorWraith2 <Wraith2@users.noreply.github.com>
Thu, 10 Jan 2019 19:40:29 +0000 (19:40 +0000)
committerSaurabh Singh <saurabh.singh@microsoft.com>
Thu, 10 Jan 2019 19:40:29 +0000 (11:40 -0800)
commit219245ba0084652f239e2c1e736c7aec4c79f466
treea4956f3f25447d9e949dbe9f9ef09c7eb1111ac8
parent37532ddeeb521d417178a2b9485d7bfa5148e048
SqlClient spanify netcore guid writes (dotnet/corefx#34390)

* add netcore specific stackalloc paths for guid writes

* remove temp byte array allocation in favour of direct span

* remove reliance on span zeroing on allocation

* change to branch and explain why clear is needed

* split netstandard and netcore #ifdef regions out into conditionally included files
revised WriteGuid, WriteFloat and WriteDouble to use new Get*Bytes functions

* convert single line netcoreapp variants to expression body form

* rename Get*Bytes to Fill*Bytes

Commit migrated from https://github.com/dotnet/corefx/commit/36037e16523a947aa2de05eca587a6a3bd5d18b5
src/libraries/System.Data.SqlClient/src/System.Data.SqlClient.csproj
src/libraries/System.Data.SqlClient/src/System/Data/SqlClient/SqlDelegatedTransaction.NetCoreApp.cs [new file with mode: 0644]
src/libraries/System.Data.SqlClient/src/System/Data/SqlClient/SqlDelegatedTransaction.NetStandard.cs [new file with mode: 0644]
src/libraries/System.Data.SqlClient/src/System/Data/SqlClient/SqlDelegatedTransaction.cs
src/libraries/System.Data.SqlClient/src/System/Data/SqlClient/TdsParser.NetCoreApp.cs [new file with mode: 0644]
src/libraries/System.Data.SqlClient/src/System/Data/SqlClient/TdsParser.NetStandard.cs [new file with mode: 0644]
src/libraries/System.Data.SqlClient/src/System/Data/SqlClient/TdsParser.cs
src/libraries/System.Data.SqlClient/src/System/Data/SqlClient/TdsValueSetter.cs