Skip to content

Commit 2e163b2

Browse files
authored
Merge | SqlFileStream (Opt 1) (#2898)
* Moving SqlFileStream from netcore to common project * WIP merge file * Remove netfx interop classes that will be replaced with netcore interop * Bring PathInternal methods into SqlFileStream, remove the PathInternal file. * Simple merging * Merge GetFullPathInternal * Add security quality of service to common interop libraries * I think that merges OpenSqlFileStream * Bring in the interop for getting path names in netfx. Seems like a lot of hassle for little benefit :/ * Most of the work to make the shared copy work with netfx * Rewriting CreateFile to take security QoS on netfx and not on netcore * * Fix bug in merged class * Fix annoyance with failing unit test setup * * SystemMemoryVersion in versions.props * Use variable versions * Remove output type from common project * Remove dependency on System.Memory * Moving code around to match standards * Fix indenting to make next commit cleaner * Cleanup interop files * Cleaning up using statements and constants * Cleanup member variables * Make objectID back into a member variable. No need for it to be a property. * Introduce ThrowIfDisposed * * Remove setters for Name and TransactionContext * Normalize the path *once* * * Remove unnecessary fully-qualified namespace prefixes * Fix method signatures (modifier order, argument formatting) * Touching up comments * Removing redundant debugs from GetFullNameInternal * Improving GetFullPathNameNetfx * Improving open file stream code
1 parent ac1b3fb commit 2e163b2

File tree

14 files changed

+1232
-1235
lines changed

14 files changed

+1232
-1235
lines changed

src/Microsoft.Data.SqlClient/netcore/src/Common/System/IO/PathInternal.Windows.cs

Lines changed: 0 additions & 428 deletions
This file was deleted.

src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,9 @@
701701
<Compile Include="$(CommonSourceRoot)\Interop\Windows\Kernel32\Interop.FileTypes.cs">
702702
<Link>Common\Interop\Windows\Kernel32\Interop.FileTypes.cs</Link>
703703
</Compile>
704+
<Compile Include="$(CommonSourceRoot)\Interop\Windows\Kernel32\Interop.GetFullPathName.cs">
705+
<Link>Common\Interop\Windows\Kernel32\Interop.GetFullPathName.cs</Link>
706+
</Compile>
704707
<Compile Include="$(CommonSourceRoot)\Interop\Windows\Kernel32\Interop.IoControlCodeAccess.cs">
705708
<Link>Common\Interop\Windows\Kernel32\Interop.IoControlCodeAccess.cs</Link>
706709
</Compile>
@@ -722,6 +725,9 @@
722725
<Compile Include="$(CommonSourceRoot)\Interop\Windows\NtDll\Interop.RtlNtStatusToDosError.cs">
723726
<Link>Common\Interop\Windows\NtDll\Interop.RtlNtStatusToDosError.cs</Link>
724727
</Compile>
728+
<Compile Include="$(CommonSourceRoot)\Interop\Windows\NtDll\Interop.SecurityQualityOfService.cs">
729+
<Link>Common\Interop\Windows\NtDll\Interop.SecurityQualityOfService.cs</Link>
730+
</Compile>
725731
<Compile Include="$(CommonSourceRoot)Microsoft\Data\Common\AdapterUtil.Windows.cs">
726732
<Link>Microsoft\Data\Common\AdapterUtil.Windows.cs</Link>
727733
</Compile>
@@ -749,6 +755,10 @@
749755
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\TdsParserSafeHandles.Windows.cs">
750756
<Link>Microsoft\Data\SqlClient\TdsParserSafeHandles.Windows.cs</Link>
751757
</Compile>
758+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlTypes\SqlFileStream.Windows.cs">
759+
<Link>Microsoft\Data\SqlTypes\SqlFileStream.Windows.cs</Link>
760+
</Compile>
761+
752762
<Compile Include="Common\Interop\Windows\Crypt32\Interop.certificates.cs" />
753763
<Compile Include="Common\Interop\Windows\Crypt32\Interop.certificates_types.cs" />
754764
<Compile Include="Common\Interop\Windows\Kernel32\Interop.CloseHandle.cs" />
@@ -775,7 +785,6 @@
775785
<Compile Include="Common\Interop\Windows\sspicli\SSPIWrapper.cs" />
776786
<Compile Include="Common\Microsoft\Win32\SafeHandles\SafeLibraryHandle.cs" />
777787
<Compile Include="Common\System\Collections\Generic\BidirectionalDictionary.cs" />
778-
<Compile Include="Common\System\IO\PathInternal.Windows.cs" />
779788
<Compile Include="Common\System\Net\ContextFlagsAdapterPal.Windows.cs" />
780789
<Compile Include="Common\System\Net\DebugCriticalHandleZeroOrMinusOneIsInvalid.cs" />
781790
<Compile Include="Common\System\Net\Security\NegotiateStreamPal.Windows.cs" />
@@ -792,7 +801,6 @@
792801
<Compile Include="Microsoft\Data\SqlClient\TdsParser.Windows.cs" />
793802
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObjectNative.cs" />
794803
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObjectFactory.Windows.cs" />
795-
<Compile Include="Microsoft\Data\SqlTypes\SqlFileStream.Windows.cs" />
796804
</ItemGroup>
797805

798806
<!-- Unix only -->

0 commit comments

Comments
 (0)