# ProcessCommandOptions

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/ApplicationModel/ProcessCommandOptions.cs)
- Inherits: [CommandOptions](/reference/api/csharp/aspire.hosting/commandoptions.md)

Optional configuration for resource process commands added with [ResourceBuilderExtensions.WithProcessCommand(IResourceBuilder<TResource>, string, string, string, IReadOnlyList<string>, ProcessCommandOptions?)](/reference/api/csharp/aspire.hosting/resourcebuilderextensions/methods.md#withprocesscommand-iresourcebuilder-tresource-string-string-string-ireadonlylist-string-processcommandoptions).

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public class ProcessCommandOptions
    : Aspire.Hosting.ApplicationModel.CommandOptions
{
    // ...
}
```

## Constructors

- [ProcessCommandOptions](/reference/api/csharp/aspire.hosting/processcommandoptions/constructors.md#constructor)

## Properties

- [DisplayImmediately](/reference/api/csharp/aspire.hosting/processcommandoptions/properties.md#displayimmediately) : `bool` `get; set` -- Gets or sets a value indicating whether returned command output should be displayed immediately in the dashboard.
- [GetCommandResult](/reference/api/csharp/aspire.hosting/processcommandoptions/properties.md#getcommandresult) : `Func<ProcessCommandResultContext, Task<ExecuteCommandResult>>` `get; set` -- Gets or sets a callback to be invoked after the process exits to determine the result of the command invocation.
- [MaxOutputLineCount](/reference/api/csharp/aspire.hosting/processcommandoptions/properties.md#maxoutputlinecount) : `int` `get; set` -- Gets or sets the maximum number of stdout and stderr output lines returned as command result data.
- [SuccessExitCodes](/reference/api/csharp/aspire.hosting/processcommandoptions/properties.md#successexitcodes) : `IReadOnlyList<int>` `get; set` -- Gets or sets the exit codes that are treated as a successful command invocation when [ProcessCommandOptions.GetCommandResult](/reference/api/csharp/aspire.hosting/processcommandoptions/properties.md#getcommandresult) is not specified.
