Skip to content
DocsTry Aspire
DocsTry

ProcessCommandResultContext Methods

ClassMethods1 member
Context passed to callback to configure ExecuteCommandResult when using ResourceBuilderExtensions.WithProcessCommand.
GetFormattedOutput(int, string)Section titled GetFormattedOutput(int, string)string
Returns the last maxLines process output lines formatted for display.
public sealed class ProcessCommandResultContext
{
public string GetFormattedOutput(
int maxLines = 50,
string outputDescription = "Command output")
{
// ...
}
}
maxLinesintoptionalThe maximum number of lines to include.
outputDescriptionstringoptionalThe label used when the output is truncated.
stringThe formatted output.