# ContainerResourceExtensions

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/ContainerResourceExtensions.cs)

Provides extension methods for working with container resources in a distributed application model.

## Definition

```csharp
namespace Aspire.Hosting;

public static class ContainerResourceExtensions
{
    // ...
}
```

## Methods

- [GetContainerResources(DistributedApplicationModel)](/reference/api/csharp/aspire.hosting/containerresourceextensions/methods.md#getcontainerresources-distributedapplicationmodel) : [IEnumerable<IResource>](/reference/api/csharp/aspire.hosting/iresource.md) `extension` `ats ignored` -- Returns a collection of container resources in the specified distributed application model.
- [IsContainer(IResource)](/reference/api/csharp/aspire.hosting/containerresourceextensions/methods.md#iscontainer-iresource) : `bool` `extension` `ats ignored` -- Determines whether the specified resource is a container resource.
