ReplExecutionOutcome
Structured description of how a top-level run ended, handed to Resolver after every framework layer has run.
- Kind:
Class - Namespace: Repl
- Assembly:
Repl.Core - Source: src/Repl.Core/ReplExecutionOutcome.cs
Signature
Section titled “Signature”public sealed record ReplExecutionOutcome : IEquatable<ReplExecutionOutcome>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”IEquatable<ReplExecutionOutcome>
Constructors
Section titled “Constructors”ReplExecutionOutcome(ReplExecutionOutcomeKind, int, object?, Exception?)
Section titled “ReplExecutionOutcome(ReplExecutionOutcomeKind, int, object?, Exception?)”Structured description of how a top-level run ended, handed to Resolver after every framework layer has run.
public ReplExecutionOutcome(ReplExecutionOutcomeKind Kind, int ExitCode, object? Result = null, Exception? Exception = null)Parameters
Section titled “Parameters”Kind(ReplExecutionOutcomeKind): Outcome category.ExitCode(int): Exit code selected by the codes the command’s module declared (IReplModuleExitCodes), then by the ExitCodeOptions table; or the verbatim code of an IExitResult when Kind is HandlerExitCode.Result(object): Final result object when one exists: the normalized handler result, or the IReplResult the framework produced for a refusal. Do not read it as proof the caller saw that refusal — several paths report a UsageError carrying a diagnostic whose rendering was refused or never checked, an unknown--outputformat being the common cause.Exception(Exception): Exception that ended the run, when the outcome was caused by one.
Properties
Section titled “Properties”Exception
Section titled “Exception”Exception that ended the run, when the outcome was caused by one.
public Exception? Exception { get; init; }Returns
Section titled “Returns”ExitCode
Section titled “ExitCode”Exit code selected by the codes the command’s module declared (IReplModuleExitCodes), then by the ExitCodeOptions table; or the verbatim code of an IExitResult when Kind is HandlerExitCode.
public int ExitCode { get; init; }Returns
Section titled “Returns”Outcome category.
public ReplExecutionOutcomeKind Kind { get; init; }Returns
Section titled “Returns”Result
Section titled “Result”Final result object when one exists: the normalized handler result, or the IReplResult
the framework produced for a refusal. Do not read it as proof the caller saw that refusal — several
paths report a UsageError carrying a diagnostic whose
rendering was refused or never checked, an unknown --output format being the common cause.
public object? Result { get; init; }Returns
Section titled “Returns”Gets the route template of the command the invocation resolved to or addressed, for example
"tests run {filter}".
public string? Route { get; init; }Returns
Section titled “Returns”Gets what this exit code is used for: Process for the process exit code of a run (the default, and the only value a one-shot run sees), or ShellIntegrationMark when an interactive session is computing one command’s command-end mark. See Resolver for the invocation contract.
public ReplExitCodeScope Scope { get; init; }