Watch Aspire live streamsDocsTry Aspire
Watch Aspire live streamsDocsTry

ValueSnapshot<T>

Classsealednet10.0
📦 Aspire.Hosting v13.5.4
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
View all constructors
View all properties
View all methods