Documentation
Table of Contents

Class CommandOutcome

Namespace
IntentSharp.Targets
Assembly
IntentSharp.dll

Everything that came back from one operation on a target: the plan, the check it passed or failed, the target's result when it ran, the model call that planned it and the time it took. A refused or failed operation returns an outcome too, with Executed false and Check saying why.

public sealed class CommandOutcome
Inheritance
object
CommandOutcome
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Extension Methods

Constructors

CommandOutcome()

Creates an outcome; the runtime creates these.

Properties

Check

The check the command was run under, or the one that refused it.

Elapsed

Wall-clock time of the whole operation, sensing and planning included.

Executed

True when the target ran the command. False when the check refused it, the plan failed, or data.dryRun was true (then Check allows it and nothing ran).

Maintenance

What the environment change handlers did during the operation: the changes found (a target's schema before the operation, or changes found in the background since the last operation), the model calls the handlers made to recompile rules, their problems and the rule sets left behind. These calls are reported here, apart from Planning. Null when no change was handled during the operation.

Plan

The plan that was checked and, when Executed is true, run.

Planning

The model call that planned the command, with its attempts, issues and token usage. For a plan passed to ExecuteAsync(CommandPlan, CancellationToken) it is a successful result with no attempts; for an operation the check refused before planning it is an unsuccessful result with no attempts.

Result

The target's result; null when the command did not run.

Methods

As<T>()

Reads each record of Result as T, with the JSON settings IntentSharp uses for values (SerializerOptions); empty when nothing ran.