# ResourceStateSnapshot Constructors

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ResourceStateSnapshot](/reference/api/csharp/aspire.hosting/resourcestatesnapshot.md)
- Kind: `Constructors`
- Members: `1`

A snapshot of the resource state

## ResourceStateSnapshot(string, string?)

- Name: `Constructor(string, string?)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/CustomResourceSnapshot.cs#L176)

A snapshot of the resource state

```csharp
public record ResourceStateSnapshot
{
    public ResourceStateSnapshot(
        string Text,
        string? Style)
    {
        // ...
    }
}
```

## Parameters

- `Text` (`string`)
  The text for the state update. See [KnownResourceStates](/reference/api/csharp/aspire.hosting/knownresourcestates.md) for expected values.
- `Style` (`string?`)
  The style for the state update. Use for the supported styles.
