Class HostResult
- Namespace
- Valheim.Testing.GameSessions
- Assembly
- Valheim.Testing.GameSessions.dll
One host script run. Output has carriage returns removed; ExitCode is set only when Outcome is Exited.
public sealed record HostResult
- Inheritance
-
objectHostResult
Constructors
HostResult(HostOutcome, int?, string, string, TimeSpan, bool)
One host script run. Output has carriage returns removed; ExitCode is set only when Outcome is Exited.
public HostResult(HostOutcome Outcome, int? ExitCode, string Stdout, string Stderr, TimeSpan Elapsed, bool TimedOut)
Parameters
OutcomeHostOutcomeExitCodeint?StdoutstringStderrstringElapsedTimeSpanTimedOutbool
Properties
Elapsed
public TimeSpan Elapsed { get; init; }
Property Value
- TimeSpan
ExitCode
public int? ExitCode { get; init; }
Property Value
- int?
Failed
The script ran and exited non-zero. A transport failure or an unknown outcome is not a failure of the script.
public bool Failed { get; }
Property Value
- bool
Outcome
public HostOutcome Outcome { get; init; }
Property Value
Stderr
public string Stderr { get; init; }
Property Value
- string
Stdout
public string Stdout { get; init; }
Property Value
- string
Succeeded
The script exited 0.
public bool Succeeded { get; }
Property Value
- bool
TimedOut
public bool TimedOut { get; init; }
Property Value
- bool
Methods
Describe()
public string Describe()
Returns
- string
EnsureSuccess(string)
Returns this result if the script exited 0; otherwise throws HostOperationException describing what.
public HostResult EnsureSuccess(string what)
Parameters
whatstring