Skip to content
Docs Try Aspire

ContainerResourceExtensions Methods

Class Methods 2 members
Provides extension methods for working with container resources in a distributed application model.
GetContainerResources(DistributedApplicationModel) Section titled GetContainerResources(DistributedApplicationModel) extension IEnumerable<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)
{
// ...
}
}
model DistributedApplicationModel The 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) extension bool
Determines whether the specified resource is a container resource.
public static class ContainerResourceExtensions
{
public static bool IsContainer(
this IResource resource)
{
// ...
}
}
resource IResource The resource to check.
bool true if the specified resource is a container resource; otherwise, false.