Class ExecResult
- Namespace
- DotNetDo
- Assembly
- DotNetDo.Core.dll
The captured command, directory, output, and exit code of a finished process.
public sealed record ExecResult : IEquatable<ExecResult>Properties
AllOutput
The process output stream in arrival order.
public required ExecOutput[] AllOutput { get; init; }Property Value
Command
The exact rendered command text.
public required string Command { get; init; }Property Value
ExitCode
The operating-system process exit code.
public required int ExitCode { get; init; }Property Value
WorkingDirectory
The directory in which the operation executes.
public required string WorkingDirectory { get; init; }Property Value
Methods
ErrorLines()
Returns the captured standard-error messages in observed order.
public string[] ErrorLines()Returns
- string[]
OutputLines()
Returns the captured standard-output messages in observed order.
public string[] OutputLines()Returns
- string[]
ReadJson(JsonSerializerOptions?)
Reads the captured standard output as a JSON document model.
public JsonNode? ReadJson(JsonSerializerOptions? options = null)Parameters
optionsJsonSerializerOptions?
Returns
ReadJson<T>(JsonSerializerOptions?)
Deserializes the captured standard output into the requested value type.
public T? ReadJson<T>(JsonSerializerOptions? options = null)Parameters
optionsJsonSerializerOptions?
Returns
- T?
Type Parameters
T
ReadText()
Joins the captured standard-output lines using the current environment's newline.
public string ReadText()Returns
ReadToml(TomlSerializerOptions?)
Reads the captured standard output as a TOML document model.
public TomlTable ReadToml(TomlSerializerOptions? options = null)Parameters
optionsTomlSerializerOptions?
Returns
- TomlTable
ReadToml<T>(TomlSerializerOptions?)
Deserializes the captured standard output into the requested value type.
public T? ReadToml<T>(TomlSerializerOptions? options = null)Parameters
optionsTomlSerializerOptions?
Returns
- T?
Type Parameters
T
ReadXml()
Reads the captured standard output as an XML document model.
public XDocument ReadXml()Returns
ReadXml<T>()
Deserializes the captured standard output into the requested value type.
public T? ReadXml<T>()Returns
- T?
Type Parameters
T
ReadYaml()
Reads the root node of one YAML document from the captured standard output.
public YamlNode? ReadYaml()Returns
- YamlNode?
ReadYaml<T>(IDeserializer?)
Deserializes one YAML document from the captured standard output.
public T? ReadYaml<T>(IDeserializer? deserializer = null)Parameters
deserializerIDeserializer?
Returns
- T?
Type Parameters
T