Skip to content

ReplExecutionOutcome

Structured description of how a top-level run ended, handed to Resolver after every framework layer has run.

public sealed record ReplExecutionOutcome : IEquatable<ReplExecutionOutcome>
  • IEquatable<ReplExecutionOutcome>

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)
  • 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 --output format being the common cause.
  • Exception (Exception): Exception that ended the run, when the outcome was caused by one.

Exception that ended the run, when the outcome was caused by one.

public Exception? Exception { get; init; }

Exception

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; }

int

Outcome category.

public ReplExecutionOutcomeKind Kind { get; init; }

ReplExecutionOutcomeKind

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; }

object

Gets the route template of the command the invocation resolved to or addressed, for example "tests run {filter}".

public string? Route { get; init; }

string

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; }

ReplExitCodeScope