Skip to content
Docs Try Aspire

ValueSnapshot<T>

Class sealed net10.0
📦 Aspire.Hosting v13.1.2
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.
namespace Aspire.Hosting.ApplicationModel;
public sealed class ValueSnapshot<T>
where T : notnull
{
// ...
}
T : notnull