辉鸭蛋
|
5a0f7226ed
|
update ISoloTask
更新 Start 方法以接受 CancellationTokenSource 参数
这些更改主要是为了使 `Start` 方法能够接受 `CancellationTokenSource` 参数,从而更好地控制任务的取消操作。通过传递 `CancellationTokenSource`,可以在需要时取消正在运行的任务,提高了代码的灵活性和可控性。
具体更改包括:
- 将 `Start` 方法的签名从无参数更改为接受 `CancellationTokenSource` 参数。
- 在多个任务类(如 `AutoDomainTask.cs`、`AutoFightTask.cs`、`AutoGeniusInvokationTask.cs`、`AutoMusicGameTask.cs`、`AutoWoodTask.cs`)中,更新 `Start` 方法以接受并使用传入的 `CancellationTokenSource`。
- 在 `Duel.cs` 中,更新 `RunAsync` 和 `Run` 方法的参数以接受 `CancellationTokenSource`,并将 `Cts` 赋值为传入的 `cts`。
- 在 `ISoloTask.cs` 接口中,更新 `Start` 方法的签名以接受 `CancellationTokenSource` 参数。
- 在 `TaskRunner.cs` 中,调用 `soloTask.Start` 时传入 `CancellationContext.Instance.Cts` 作为参数。
|
2024-09-23 00:04:09 +08:00 |
|
辉鸭蛋
|
8bb1d728ff
|
refactor: solo task
|
2024-09-22 23:56:39 +08:00 |
|
ema
|
9378a134bd
|
remove: package H.InputSimulator #154
|
2024-05-12 05:16:27 +08:00 |
|
辉鸭蛋
|
6f67bea46c
|
auto music: fix low resolution not work
|
2024-05-10 20:11:29 +08:00 |
|
辉鸭蛋
|
8fe59842c6
|
update music game
|
2024-05-09 21:56:56 +08:00 |
|
辉鸭蛋
|
ee154da3c3
|
music game: Gdi32.GetPixel
|
2024-05-09 02:46:33 +08:00 |
|
辉鸭蛋
|
9886e7eeff
|
test new method
|
2024-05-08 02:52:52 +08:00 |
|
辉鸭蛋
|
5797c716dc
|
auto music game
|
2024-05-08 01:59:30 +08:00 |
|