KestrunTask class

Represents a single-shot task execution with its current state and telemetry.

public sealed class KestrunTask
parameter description
Id Unique task identifier.
ScriptCode The scripting language and code configuration for this task.
tokenSource Cancellation token source for this task.

Public Members

name description
Children { get; } Child tasks spawned by this task.
CompletedAtUtc { get; } UTC timestamp when execution ended.
Description { get; set; } Optional description of the task.
Fault { get; } Fault exception if the task failed.
Finished { get; } Indicates whether the task has reached a terminal state.
Id { get; set; } Unique task identifier.
Name { get; set; } Optional human-friendly name of the task.
Output { get; } Output produced by the task (last expression for C#/VB, pipeline for PowerShell).
Parent { get; set; } For hierarchical tasks; null for root tasks.
Progress { get; set; } Progress state of the task, if supported by the script.
Runner { get; } The background task executing this work.
ScriptCode { get; set; } The scripting language and code configuration for this task.
StartedAtUtc { get; } UTC timestamp when execution started.
State { get; } Current state of the task.
TokenSource { get; } Cancellation token source for this task.
Work { get; set; } Compiled work delegate producing a result.
ToKrTask() Creates a basic task info record for this task.

See Also