# ExecuteCommandContext Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ExecuteCommandContext](/reference/api/csharp/aspire.hosting/executecommandcontext.md)
- Kind: `Properties`
- Members: `4`

Context for [ResourceCommandAnnotation.ExecuteCommand](/reference/api/csharp/aspire.hosting/resourcecommandannotation/properties.md#executecommand).

## CancellationToken

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

The cancellation token.

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

## Logger

- Name: `Logger`
- Modifiers: `get; init`
- Returns: `ILogger`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ResourceCommandAnnotation.cs)

The logger for the resource.

```csharp
public ILogger Logger { get; init; }
```

## ResourceName

- Name: `ResourceName`
- Modifiers: `get; init`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ResourceCommandAnnotation.cs)

The resource name.

```csharp
public string ResourceName { get; init; }
```

## ServiceProvider

- Name: `ServiceProvider`
- Modifiers: `get; init`
- Returns: `IServiceProvider`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ResourceCommandAnnotation.cs)

The service provider.

```csharp
public IServiceProvider ServiceProvider { get; init; }
```
