Skip to content

Commit 91f30fc

Browse files
committed
2 parents 2029080 + 0fd8306 commit 91f30fc

File tree

134 files changed

+2951
-2630
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+2951
-2630
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88

99
jobs:
1010
ci:
11-
runs-on: windows-2022
11+
runs-on: windows-2025
1212
strategy:
1313
fail-fast: false
1414
matrix:
@@ -17,12 +17,12 @@ jobs:
1717
timeout-minutes: 120
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v5
2121

22-
- name: .NET 9.0
23-
uses: actions/setup-dotnet@v4
22+
- name: .NET 10.0
23+
uses: actions/setup-dotnet@v5
2424
with:
25-
dotnet-version: 9.0.x
25+
dotnet-version: 10.0.x
2626

2727
- name: Build
2828
run: |

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* [Downloads](https://github.com/FirebirdSQL/NETProvider/releases)
2727
* [Issue tracker](https://github.com/FirebirdSQL/NETProvider/issues)
2828
* [Development mailing list](https://groups.google.com/forum/#!forum/firebird-net-provider)
29+
* [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/FirebirdSQL/NETProvider)
2930

3031
## Builds
3132

build.ps1

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,16 @@ function Clean() {
2020
}
2121

2222
function Build() {
23-
function b($target, $check=$True) {
24-
dotnet msbuild /t:$target /p:Configuration=$Configuration /p:ContinuousIntegrationBuild=true "$baseDir\src\NETProvider.sln" /v:m /m
25-
if ($check) {
26-
Check-ExitCode
27-
}
28-
}
29-
b 'Clean'
30-
# this sometimes fails on CI
31-
b 'Restore' $False
32-
b 'Restore'
33-
b 'Build'
23+
dotnet clean "$baseDir\src\NETProvider.slnx" -c $Configuration -v m
24+
dotnet build "$baseDir\src\NETProvider.slnx" -c $Configuration -p:ContinuousIntegrationBuild=true -v m
3425
}
3526

3627
function Versions() {
3728
function v($file) {
3829
return (Get-Item $file).VersionInfo.ProductVersion -replace '(\d+)\.(\d+)\.(\d+)(-[a-z0-9]+)?.*','$1.$2.$3$4'
3930
}
40-
$script:versionProvider = v $baseDir\src\FirebirdSql.Data.FirebirdClient\bin\$Configuration\net8.0\FirebirdSql.Data.FirebirdClient.dll
41-
$script:versionEFCore = v $baseDir\src\FirebirdSql.EntityFrameworkCore.Firebird\bin\$Configuration\net8.0\FirebirdSql.EntityFrameworkCore.Firebird.dll
31+
$script:versionProvider = v $baseDir\src\FirebirdSql.Data.FirebirdClient\bin\$Configuration\net10.0\FirebirdSql.Data.FirebirdClient.dll
32+
$script:versionEFCore = v $baseDir\src\FirebirdSql.EntityFrameworkCore.Firebird\bin\$Configuration\net10.0\FirebirdSql.EntityFrameworkCore.Firebird.dll
4233
$script:versionEF6 = v $baseDir\src\EntityFramework.Firebird\bin\$Configuration\net48\EntityFramework.Firebird.dll
4334
}
4435

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<PackageLicenseFile>license.txt</PackageLicenseFile>
2121
</PropertyGroup>
2222
<PropertyGroup>
23-
<CopyrightEndYear>2024</CopyrightEndYear>
23+
<CopyrightEndYear>2025</CopyrightEndYear>
2424
</PropertyGroup>
2525

2626
<!-- SourceLink -->

src/EntityFramework.Firebird.Tests/EntityFramework.Firebird.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net9.0</TargetFramework>
3+
<TargetFramework>net10.0</TargetFramework>
44
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
55
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
66
<SkipSourceLink>true</SkipSourceLink>
@@ -16,7 +16,7 @@
1616
<Using Include="NUnit.Framework.Legacy.CollectionAssert" Alias="CollectionAssert" />
1717
<Using Include="NUnit.Framework.Legacy.StringAssert" Alias="StringAssert" />
1818
</ItemGroup>
19-
<ItemGroup Condition="'$(TargetFramework)'=='net9.0'">
19+
<ItemGroup Condition="'$(TargetFramework)'=='net10.0'">
2020
<!-- left in repo as an example/documentation for .NET Framework -->
2121
<None Remove="app.config" />
2222
</ItemGroup>

src/EntityFramework.Firebird/EntityFramework.Firebird.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,12 @@
4747
</ItemGroup>
4848
<ItemGroup>
4949
<PackageReference Include="EntityFramework" Version="$(EF6ReferencePackageVersion)" />
50+
<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="$(EF6ReferenceProviderVersion)" />
5051
</ItemGroup>
5152
<ItemGroup Condition="'$(TargetFramework)'=='net48'">
5253
<Reference Include="System.Configuration" />
5354
<Reference Include="Microsoft.CSharp" />
5455
</ItemGroup>
5556
<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.1'">
5657
</ItemGroup>
57-
<ItemGroup Condition="'$(Configuration)'!='Debug'">
58-
<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="$(EF6ReferenceProviderVersion)" />
59-
</ItemGroup>
60-
<ItemGroup Condition="'$(Configuration)'=='Debug'">
61-
<ProjectReference Include="..\FirebirdSql.Data.FirebirdClient\FirebirdSql.Data.FirebirdClient.csproj" />
62-
</ItemGroup>
6358
</Project>

src/FirebirdSql.Data.FirebirdClient.Tests/FirebirdSql.Data.FirebirdClient.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net9.0</TargetFramework>
3+
<TargetFramework>net10.0</TargetFramework>
44
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
55
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
66
<SkipSourceLink>true</SkipSourceLink>

src/FirebirdSql.Data.FirebirdClient/Client/ClientFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ private static ValueTask<DatabaseBase> CreateNativeDatabaseAsync(ConnectionStrin
128128
{
129129
var charset = GetCharset(options);
130130

131-
return ValueTask2.FromResult<DatabaseBase>(new Native.FesDatabase(options.ClientLibrary, charset, options.PacketSize, options.Dialect));
131+
return ValueTask.FromResult<DatabaseBase>(new Native.FesDatabase(options.ClientLibrary, charset, options.PacketSize, options.Dialect));
132132
}
133133

134134
private static ServiceManagerBase CreateManagedServiceManager(ConnectionString options)
@@ -194,7 +194,7 @@ private static ValueTask<ServiceManagerBase> CreateNativeServiceManagerAsync(Con
194194
{
195195
var charset = GetCharset(options);
196196

197-
return ValueTask2.FromResult<ServiceManagerBase>(new Native.FesServiceManager(options.ClientLibrary, charset));
197+
return ValueTask.FromResult<ServiceManagerBase>(new Native.FesServiceManager(options.ClientLibrary, charset));
198198
}
199199

200200
private static Exception UnsupportedProtocolException() => new NotSupportedException("Protocol not supported.");

src/FirebirdSql.Data.FirebirdClient/Client/Managed/FirebirdNetworkHandlingWrapper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,14 @@ public async ValueTask<int> ReadAsync(byte[] buffer, int offset, int count, Canc
122122

123123
public void Write(byte[] buffer, int offset, int count)
124124
{
125-
for (var i = offset; i < count; i++)
125+
for (var i = 0; i < count; i++)
126126
_outputBuffer.Enqueue(buffer[offset + i]);
127127
}
128128
public ValueTask WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)
129129
{
130-
for (var i = offset; i < count; i++)
130+
for (var i = 0; i < count; i++)
131131
_outputBuffer.Enqueue(buffer[offset + i]);
132-
return ValueTask2.CompletedTask;
132+
return ValueTask.CompletedTask;
133133
}
134134

135135
public void Flush()

src/FirebirdSql.Data.FirebirdClient/Client/Managed/GdsConnection.cs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,7 @@ public async ValueTask ConnectAsync(CancellationToken cancellationToken = defaul
114114
{
115115
using (var combinedCts = CancellationTokenSource.CreateLinkedTokenSource(timeoutCts.Token, cancellationToken))
116116
{
117-
#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1
118-
static Func<IPEndPoint, CancellationToken, Task> ConnectAsyncHelper(Socket socket) => (e, ct) => Task.Factory.FromAsync(socket.BeginConnect, socket.EndConnect, e, null);
119-
#else
120-
static Func<IPEndPoint, CancellationToken, Task> ConnectAsyncHelper(Socket socket) => (e, ct) => SocketTaskExtensions.ConnectAsync(socket, e, ct).AsTask();
121-
#endif
122-
await ConnectAsyncHelper(socket)(endPoint, combinedCts.Token).ConfigureAwait(false);
117+
await socket.ConnectAsync(endPoint, combinedCts.Token).ConfigureAwait(false);
123118
}
124119
}
125120

@@ -366,24 +361,15 @@ public void Disconnect()
366361
{
367362
if (_networkStream != null)
368363
{
369-
#if NET48 || NETSTANDARD2_0
370364
_networkStream.Dispose();
371-
#else
372-
_networkStream.Dispose();
373-
#endif
374365
_networkStream = null;
375366
}
376367
}
377368
public async ValueTask DisconnectAsync(CancellationToken cancellationToken = default)
378369
{
379370
if (_networkStream != null)
380371
{
381-
#if NET48 || NETSTANDARD2_0
382-
_networkStream.Dispose();
383-
await ValueTask2.CompletedTask.ConfigureAwait(false);
384-
#else
385372
await _networkStream.DisposeAsync().ConfigureAwait(false);
386-
#endif
387373
_networkStream = null;
388374
}
389375
}

0 commit comments

Comments
 (0)