Skip to content

Commit

Permalink
Remove System.Data.SqlClient
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertvanHorrik committed Nov 15, 2024
1 parent 08424e1 commit 2a2d5e3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/Orc.Extensibility.Example.ExtensionA/FodyWeavers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<IncludeRuntimeAssemblies>
Microsoft.Data.SqlClient
Microsoft.Data.SqlClient.SNI
System.Data.SqlClient
sni
</IncludeRuntimeAssemblies>
</Costura>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
<PackageReference Include="Orc.Controls" Version="5.0.7" />
<PackageReference Include="Orc.Search.Xaml" Version="5.0.0" />
<PackageReference Include="Orchestra.Core" Version="7.0.2" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="YamlDotNet" Version="16.2.0" PrivateAssets="all" />
</ItemGroup>

Expand Down
9 changes: 8 additions & 1 deletion src/Orc.Extensibility/Models/CosturaRuntimeAssembly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,14 @@ private void CopyTo(Stream source, Stream destination)
private byte[] ReadStream(Stream stream)
{
var array = new byte[stream.Length];

#if NET8_0_OR_GREATER
stream.ReadExactly(array);
#else
#pragma warning disable CA2022 // Avoid inexact read with 'Stream.Read'
stream.Read(array, 0, array.Length);
#pragma warning restore CA2022 // Avoid inexact read with 'Stream.Read'
#endif
return array;
}
}
}

0 comments on commit 2a2d5e3

Please sign in to comment.