Бэкенд отмены задачи

This commit is contained in:
2025-02-22 09:28:59 +03:00
parent a887b614c7
commit c71585b100
12 changed files with 141 additions and 36 deletions
+2 -1
View File
@@ -2,7 +2,8 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
+7
View File
@@ -1,4 +1,6 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Example.Shared;
using mROA.Implementation.Attributes;
@@ -26,5 +28,10 @@ namespace Example.Backend
{
throw new NotImplementedException();
}
public async Task AsyncTest(CancellationToken token)
{
await Task.Delay(TimeSpan.FromSeconds(5), token);
}
}
}
+2 -1
View File
@@ -34,7 +34,8 @@ class Program
builder.Modules.Add(new CreativeRepresentationModuleProducer(
new IInjectableModule[] { builder.GetModule<JsonSerializationToolkit>()! },
typeof(RepresentationModule)));
builder.Modules.Add(new CancellationRepository());
builder.Build();
new RemoteTypeBinder();