ProcessCommandResultContext Properties
ClassProperties10 members
Context passed to callback to configure
ExecuteCommandResult when using ResourceBuilderExtensions.WithProcessCommand. Gets the invocation arguments supplied by the client when the command is executed.
public InteractionInputCollection Arguments { get; init; }Remarks
The collection contains the arguments described by the command's CommandOptions.Arguments with their submitted values populated. CLI positional arguments are mapped by declaration order. Dashboard, MCP, and other named-payload clients are mapped by InteractionInput.Name.
Examples
Read a declared command argument when producing a custom result:
GetCommandResult = context => Task.FromResult(CommandResults.Success("received", context.Arguments.GetString("message")!)); Gets the cancellation token.
public CancellationToken CancellationToken { get; init; } Gets the logger for the command invocation.
public ILogger Logger { get; init; } Gets the retained stdout and stderr output lines in the order observed by the process runner.
public IReadOnlyList<string> Output { get; init; } Gets the process command specification used for the command invocation.
public ProcessCommandSpec ProcessCommandSpec { get; init; } Gets the name of the resource the command was configured on.
public string ResourceName { get; init; } Gets the service provider.
public IServiceProvider ServiceProvider { get; init; } Gets the service provider.
public IServiceProvider Services { get; init; } Gets the total number of stdout and stderr lines observed by the process runner.
public int TotalOutputLineCount { get; init; }