# RequiredCommandValidationContext

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/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.
