Method RunTaskDeletionAsync
- Namespace
- Oscova.Agents.Tasks
- Assembly
- Oscova.Agents.dll
RunTaskDeletionAsync(string, string, Func<CancellationToken, Task<bool>>, CancellationToken, Func<CancellationToken, Task>?)
Cancels a task and keeps its admission closed while its definition is deleted.
public Task RunTaskDeletionAsync(string userId, string taskId, Func<CancellationToken, Task<bool>> deleteAsync, CancellationToken ct = default, Func<CancellationToken, Task>? afterDeleteAsync = null)Parameters
userIdstring-
The task owner's user identifier.
taskIdstring-
The task identifier being deleted.
deleteAsyncFunc<CancellationToken, Task<bool>>-
Deletes the persisted task definition after execution drains and reports whether it existed.
ctCancellationToken-
A token that bounds cancellation, draining, and deletion.
afterDeleteAsyncFunc<CancellationToken, Task>?-
Completes deletion side effects before task saves may resume.