# RequiredCommandValidationContext Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [RequiredCommandValidationContext](/reference/api/csharp/aspire.hosting/requiredcommandvalidationcontext.md)
- Kind: `Properties`
- Members: `3`

Provides context for validating a required command.

## CancellationToken

- Name: `CancellationToken`
- Modifiers: `get`
- Returns: `CancellationToken`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/RequiredCommandValidationContext.cs#L30)

Gets a cancellation token that can be used to cancel the validation.

```csharp
public CancellationToken CancellationToken { get; }
```

## ResolvedPath

- Name: `ResolvedPath`
- Modifiers: `get`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/RequiredCommandValidationContext.cs#L20)

Gets the resolved full path to the command executable.

```csharp
public string ResolvedPath { get; }
```

## Services

- Name: `Services`
- Modifiers: `get`
- Returns: `IServiceProvider`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/RequiredCommandValidationContext.cs#L25)

Gets the service provider for accessing application services.

```csharp
public IServiceProvider Services { get; }
```
