# InteractionFileCollection Methods

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [InteractionFileCollection](/reference/api/csharp/aspire.hosting/interactionfilecollection.md)
- Kind: `Methods`
- Members: `2`

Represents the uploaded files associated with an interaction input.

<a id="dispose"></a>

## Dispose

- Name: `Dispose`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/f4c27f2d43ddc1cacd0dd083b30d1fea1cee7a62/src/Aspire.Hosting/IInteractionService.cs#L578-L590)

Deletes the uploaded files from disk and prevents new content reads. Streams that are already open remain usable until those streams are disposed.

```csharp
public sealed class InteractionFileCollection
{
    public void Dispose()
    {
        // ...
    }
}
```

<a id="getenumerator"></a>

## GetEnumerator

- Name: `GetEnumerator`
- Returns: [IEnumerator<InteractionFile>](/reference/api/csharp/aspire.hosting/interactionfile.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/f4c27f2d43ddc1cacd0dd083b30d1fea1cee7a62/src/Aspire.Hosting/IInteractionService.cs#L567)

Returns an enumerator that iterates through the uploaded files.

```csharp
public sealed class InteractionFileCollection
{
    public IEnumerator<InteractionFile> GetEnumerator()
    {
        // ...
    }
}
```

## Returns

[IEnumerator<InteractionFile>](/reference/api/csharp/aspire.hosting/interactionfile.md) -- An enumerator for the uploaded files.
