# InteractionResult

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

Provides a set of static methods for the `Hosting.InteractionResult`1`.

## Definition

```csharp
namespace Aspire.Hosting;

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

## Methods

- [Cancel(T?)](/reference/api/csharp/aspire.hosting/interactionresult/methods.md#cancel-t) : [InteractionResult<T>](/reference/api/csharp/aspire.hosting/interactionresult-1.md) `static` -- Creates an `Hosting.InteractionResult`1` indicating a canceled interaction.
- [Ok(T)](/reference/api/csharp/aspire.hosting/interactionresult/methods.md#ok-t) : [InteractionResult<T>](/reference/api/csharp/aspire.hosting/interactionresult-1.md) `static` -- Creates a new `Hosting.InteractionResult`1` with the specified result and a flag indicating that the interaction was not canceled.
