KestrunTaskService class
Service to run ad-hoc Kestrun tasks in PowerShell, C#, or VB.NET, with status, result, and cancellation.
public sealed class KestrunTaskService
| parameter | description |
| pool | PowerShell runspace pool manager. |
| log | Logger instance. |
Public Members
| name | description |
| KestrunTaskService(…) | Service to run ad-hoc Kestrun tasks in PowerShell, C#, or VB.NET, with status, result, and cancellation. |
| Cancel(…) | Attempts to cancel a task. |
| Create(…) | Creates a task from a code snippet without starting it. |
| Get(…) | Gets a task by id. |
| GetResult(…) | Gets the output object for a completed task. |
| GetState(…) | Gets the current state for a task. |
| List() | Lists all tasks with basic info. Does not include output or error details. |
| Remove(…) | Removes a finished task from the registry. |
| SetTaskDescription(…) | Sets or updates the description of a task. |
| SetTaskName(…) | Sets or updates the name of a task. |
| Start(…) | Starts a previously created task by id. |
| StartAsync(…) | Starts a previously created task by id, and awaits its completion. |
See Also