Skip to content

Commit 1b00616

Browse files
authored
Update to .NET 8 (#71)
1 parent 49ced3d commit 1b00616

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Setup .NET
3030
uses: actions/setup-dotnet@v4
3131
with:
32-
dotnet-version: 7
32+
dotnet-version: 8
3333

3434
- name: Build
3535
run: dotnet build

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<Nullable>enable</Nullable>
1414
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1515
<RepositoryUrl>https://github.com/temporalio/samples-dotnet</RepositoryUrl>
16-
<TargetFramework>net7.0</TargetFramework>
16+
<TargetFramework>net8.0</TargetFramework>
1717
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1818
<Version>0.1.0</Version>
1919
</PropertyGroup>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is the set of .NET samples for the [.NET SDK](https://github.com/temporalio
66

77
Prerequisites:
88

9-
* .NET >= 6
9+
* .NET 8
1010
* [Local Temporal server running](https://docs.temporal.io/application-development/foundations#run-a-development-cluster)
1111

1212
## Samples

src/Encryption/Codec/EncryptionCodec.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private byte[] Encrypt(byte[] data)
7171
RandomNumberGenerator.Fill(nonceSpan);
7272

7373
// Perform encryption
74-
using (var aes = new AesGcm(key))
74+
using (var aes = new AesGcm(key, TagSize))
7575
{
7676
aes.Encrypt(nonceSpan, data, bytes.AsSpan(NonceSize + TagSize), bytes.AsSpan(NonceSize, TagSize));
7777
return bytes;
@@ -82,7 +82,7 @@ private byte[] Decrypt(byte[] data)
8282
{
8383
var bytes = new byte[data.Length - NonceSize - TagSize];
8484

85-
using (var aes = new AesGcm(key))
85+
using (var aes = new AesGcm(key, TagSize))
8686
{
8787
aes.Decrypt(
8888
data.AsSpan(0, NonceSize), data.AsSpan(NonceSize + TagSize), data.AsSpan(NonceSize, TagSize), bytes.AsSpan());

src/WorkerSpecificTaskQueues/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async Task RunWorkerAsync()
4949
{
5050
try
5151
{
52-
tokenSource.Cancel();
52+
await tokenSource.CancelAsync();
5353
await Task.WhenAll(tasks);
5454
}
5555
catch (Exception ex)

0 commit comments

Comments
 (0)