Skip to content
DocsTry Aspire
DocsTry

ContainerResourceExtensions Methods

ClassMethods2 members
Provides extension methods for working with container resources in a distributed application model.
GetContainerResources(DistributedApplicationModel)Section titled GetContainerResources(DistributedApplicationModel)extensionIEnumerable<IResource>
Returns a collection of container resources in the specified distributed application model.
public static class ContainerResourceExtensions
{
public static IEnumerable<IResource> GetContainerResources(
this DistributedApplicationModel model)
{
// ...
}
}
modelDistributedApplicationModelThe distributed application model to search for container resources.
IEnumerable<IResource>A collection of container resources in the specified distributed application model.
IsContainer(IResource)Section titled IsContainer(IResource)extensionbool
Determines whether the specified resource is a container resource.
public static class ContainerResourceExtensions
{
public static bool IsContainer(
this IResource resource)
{
// ...
}
}
resourceIResourceThe resource to check.
booltrue if the specified resource is a container resource; otherwise, false.