# RequiredCommandValidationContext

- 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/RequiredCommandValidationContext.cs)

Provides context for validating a required command.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public sealed class RequiredCommandValidationContext
{
    // ...
}
```

## Constructors

- [RequiredCommandValidationContext(string, IServiceProvider, CancellationToken)](/reference/api/csharp/aspire.hosting/requiredcommandvalidationcontext/constructors.md#constructor-string-iserviceprovider-cancellationtoken) -- Provides context for validating a required command.

## Properties

- [CancellationToken](/reference/api/csharp/aspire.hosting/requiredcommandvalidationcontext/properties.md#cancellationtoken) : `CancellationToken` `get` -- Gets a cancellation token that can be used to cancel the validation.
- [ResolvedPath](/reference/api/csharp/aspire.hosting/requiredcommandvalidationcontext/properties.md#resolvedpath) : `string` `get` -- Gets the resolved full path to the command executable.
- [Services](/reference/api/csharp/aspire.hosting/requiredcommandvalidationcontext/properties.md#services) : `IServiceProvider` `get` -- Gets the service provider for accessing application services.
