Watch Aspire live streamsDocsTry Aspire

VolumeMountBindingAnnotation Constructors

ClassConstructors1 member
Describes how a named volume binds to a resource across the inner and outer loop.
Describes how a named volume binds to a resource across the inner and outer loop.
public sealed class VolumeMountBindingAnnotation
{
public VolumeMountBindingAnnotation(
string volumeName)
{
// ...
}
}
volumeNamestring

This annotation is the extensibility point compute environments use to participate in the portable volume path convention. It carries two independent facets, either of which may be absent:

The two facets are produced by different parties at different times — the AppHost author opts into the environment variable, while the compute environment supplies the local path — so a resource can carry several of these annotations for the same VolumeMountBindingAnnotation.VolumeName. A binding resolves through its own VolumeMountBindingAnnotation.RunModeHostPathResolver when it has one, and otherwise takes the last sibling that does. VolumeMountBindingAnnotation.VolumeName alone is not a unique key, because separate compute environments can each declare a volume under the same name.