Skip to content

Commit 6857a4c

Browse files
authored
feat!: .NET 10 Support (#245)
1 parent 47e62a5 commit 6857a4c

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

Directory.Build.props

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
<Project>
22
<PropertyGroup>
3-
<_TargetFrameworks>net8.0-windows;net9.0-windows</_TargetFrameworks>
3+
<_TargetFrameworks>net8.0-windows;net9.0-windows;net10.0-windows</_TargetFrameworks>
44
<EnableWindowsTargeting>true</EnableWindowsTargeting>
55
</PropertyGroup>
6-
<PropertyGroup>
7-
<!-- Workaround, until https://github.com/GitTools/GitVersion/pull/4206 is released -->
8-
<GitVersionTargetFramework>net8.0</GitVersionTargetFramework>
9-
</PropertyGroup>
106
<PropertyGroup Label="Package settings">
117
<Title>$(MSBuildProjectName)</Title>
128
<Description>.NET Hosting infrastructure for Windows Forms.</Description>

tests/NetEvolve.Extensions.Hosting.WinForms.Tests.Unit/Internals/WindowsFormsSynchronizationContextProviderTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void Invoke_FuncWithInput_ContextNull_ThrowsArgumentNullException()
9696
var provider = new WindowsFormsSynchronizationContextProvider();
9797

9898
// Act / Assert
99-
_ = Assert.Throws<ArgumentNullException>("Context", () => provider.Invoke((int input) => input * 2, 21));
99+
_ = Assert.Throws<ArgumentNullException>("Context", () => provider.Invoke(input => input * 2, 21));
100100
}
101101

102102
[Test]
@@ -109,7 +109,7 @@ public async Task Invoke_FuncWithInput_Expected()
109109

110110
// Act
111111
#pragma warning disable CA1849, S6966, VSTHRD103 // Call async methods when in an async method
112-
var result = provider.Invoke((int input) => input * 2, 21);
112+
var result = provider.Invoke(input => input * 2, 21);
113113
#pragma warning restore CA1849, S6966, VSTHRD103 // Call async methods when in an async method
114114

115115
// Assert
@@ -278,7 +278,7 @@ public async Task InvokeAsync_FuncWithInput_ContextNull_ThrowsArgumentNullExcept
278278
// Act / Assert
279279
_ = Assert.ThrowsAsync<ArgumentNullException>(
280280
"Context",
281-
async () => await provider.InvokeAsync((int input) => input * 2, 21)
281+
async () => await provider.InvokeAsync(input => input * 2, 21)
282282
);
283283
}
284284

@@ -293,7 +293,7 @@ public async Task InvokeAsync_FuncWithInputThrows_ExpectedException()
293293
// Act
294294
_ = await Assert.ThrowsAsync<NotImplementedException>(async () =>
295295
await provider.InvokeAsync<int, int>(
296-
(int input) =>
296+
input =>
297297
{
298298
throw new NotImplementedException();
299299
},
@@ -315,7 +315,7 @@ public async Task InvokeAsync_FuncWithInput_CancellationTokenCanceled_ThrowsTask
315315

316316
// Act
317317
_ = await Assert.ThrowsAsync<TaskCanceledException>(async () =>
318-
await provider.InvokeAsync((int input) => input * 2, 21, new CancellationToken(true))
318+
await provider.InvokeAsync(input => input * 2, 21, new CancellationToken(true))
319319
);
320320
}
321321

@@ -328,7 +328,7 @@ public async Task InvokeAsync_FuncWithInput_Expected()
328328
var provider = new WindowsFormsSynchronizationContextProvider { Context = SynchronizationContext.Current! };
329329

330330
// Act
331-
var result = await provider.InvokeAsync((int input) => input * 2, 21);
331+
var result = await provider.InvokeAsync(input => input * 2, 21);
332332

333333
// Assert
334334
_ = await Assert.That(result).IsEqualTo(42);

0 commit comments

Comments
 (0)