ProcessCommandOptions Properties
Class Properties 4 members
Optional configuration for resource process commands added with
ResourceBuilderExtensions.WithProcessCommand. Gets or sets a value indicating whether returned command output should be displayed immediately in the dashboard.
public bool DisplayImmediately { get; set; }Remarks
The default value is true.
This option is not applied by default result handling when ProcessCommandOptions.GetCommandResult is specified.
GetCommandResult Section titled GetCommandResult nullable Func<ProcessCommandResultContext, Task<ExecuteCommandResult>> Gets or sets a callback to be invoked after the process exits to determine the result of the command invocation.
public Func<ProcessCommandResultContext, Task<ExecuteCommandResult>>? GetCommandResult { get; set; }Remarks
When specified,
ProcessCommandOptions.SuccessExitCodes, ProcessCommandOptions.MaxOutputLineCount, and ProcessCommandOptions.DisplayImmediately are not applied by the default result handling. The callback can use ProcessCommandResultContext.GetFormattedOutput to format retained process output. Gets or sets the maximum number of stdout and stderr output lines returned as command result data.
public int MaxOutputLineCount { get; set; }Remarks
Standard output and standard error are captured together in the order observed by the process runner. The returned command result contains the retained tail of the combined output as plain text.
This option is not applied by default result handling when ProcessCommandOptions.GetCommandResult is specified.
Gets or sets the exit codes that are treated as a successful command invocation when
ProcessCommandOptions.GetCommandResult is not specified. public IReadOnlyList<int> SuccessExitCodes { get; set; }Remarks
The default value is
[0].