Watch Aspire live streamsDocsTry Aspire

DistributedApplicationModelExtensions Methods

ClassMethods3 members
Provides extension methods on the DistributedApplicationModel class.
GetBuildAndPushResources(DistributedApplicationModel)Section titled GetBuildAndPushResources(DistributedApplicationModel)extensionIEnumerable<IResource>
Returns the build and push resources from the DistributedApplicationModel. Build and push resources are those that require building and pushing container images to a registry, and are not marked to be ignored by the manifest publishing callback annotation.
public static class DistributedApplicationModelExtensions
{
public static IEnumerable<IResource> GetBuildAndPushResources(
this DistributedApplicationModel model)
{
// ...
}
}
modelDistributedApplicationModelThe distributed application model to extract build and push resources from.
IEnumerable<IResource>An enumerable of build and push IResource in the model.
Returns the build resources from the DistributedApplicationModel. Build resources are those that are either build-only containers or project resources, and are not marked to be ignored by the manifest publishing callback annotation.
public static class DistributedApplicationModelExtensions
{
public static IEnumerable<IResource> GetBuildResources(
this DistributedApplicationModel model)
{
// ...
}
}
modelDistributedApplicationModelThe distributed application model to extract build resources from.
IEnumerable<IResource>An enumerable of build IResource in the model.
GetComputeResources(DistributedApplicationModel)Section titled GetComputeResources(DistributedApplicationModel)extensionIEnumerable<IResource>
Returns the compute resources from the DistributedApplicationModel. Compute resources are containers, emulators, or resources that support .NET program publishing. Resources excluded from publishing and build-only containers are omitted.
public static class DistributedApplicationModelExtensions
{
public static IEnumerable<IResource> GetComputeResources(
this DistributedApplicationModel model)
{
// ...
}
}
modelDistributedApplicationModelThe distributed application model to extract compute resources from.
IEnumerable<IResource>An enumerable of compute IResource in the model.