# ValueSnapshot<T> Constructors

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ValueSnapshot<T>](/reference/api/csharp/aspire.hosting/valuesnapshot-1.md)
- Kind: `Constructors`
- Members: `1`

Provides an asynchronously initialized value that: - Can be awaited via GetValueAsync() until the first value or exception is set. - Exposes the latest value after it has been set (supports re-setting). - Tracks whether a value or exception was ever set via IsValueSet. - Supports setting an exception that will be thrown by GetValueAsync. Thread-safe for concurrent SetValue / SetException / GetValueAsync calls.

## ValueSnapshot

- Name: `Constructor`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ValueSnapshot.cs#L20-L23)

```csharp
public sealed class ValueSnapshot<T>
{
    public ValueSnapshot()
    {
        // ...
    }
}
```
