# UpdateCommandStateContext Properties

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

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

<a id="resourcesnapshot"></a>

## ResourceSnapshot

- Name: `ResourceSnapshot`
- Modifiers: `get; init`
- Returns: [CustomResourceSnapshot](/reference/api/csharp/aspire.hosting/customresourcesnapshot.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/f4c27f2d43ddc1cacd0dd083b30d1fea1cee7a62/src/Aspire.Hosting/ApplicationModel/ResourceCommandAnnotation.cs)

The resource snapshot.

```csharp
public CustomResourceSnapshot ResourceSnapshot { get; init; }
```

## ATS metadata

### Ignored by ATS

- Reason: CustomResourceSnapshot contains object-valued properties that are not statically representable in polyglot SDKs. Use ResourceSnapshotData for the curated ATS projection.

<a id="serviceprovider"></a>

## ServiceProvider

> **Obsolete:** Use Services instead.

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

The service provider.

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

## ATS metadata

### Ignored by ATS

- Reason: Obsolete alias for Services. The service provider is exposed to polyglot hosts via Services (services).

<a id="services"></a>

## Services

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

The service provider.

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