Skip to content
Docs Try Aspire
Docs Try

ProcessCommandResultContext Methods

Class Methods 1 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")
{
// ...
}
}
maxLines int optional The maximum number of lines to include.
outputDescription string optional The label used when the output is truncated.
string The formatted output.