# WaitAnnotation Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [WaitAnnotation](/reference/api/csharp/aspire.hosting/waitannotation.md)
- Kind: `Properties`
- Members: `4`

Represents a wait relationship between two resources.

## ExitCode

- Name: `ExitCode`
- Modifiers: `get`
- Returns: `int`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/WaitAnnotation.cs#L38)

The exit code that the resource must return for the wait to be satisfied.

```csharp
public int ExitCode { get; }
```

## Resource

- Name: `Resource`
- Modifiers: `get`
- Returns: [IResource](/reference/api/csharp/aspire.hosting/iresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/WaitAnnotation.cs#L23)

The resource that will be waited on.

```csharp
public IResource Resource { get; }
```

## WaitBehavior

- Name: `WaitBehavior`
- Modifiers: `nullable` `get; init`
- Returns: [WaitBehavior?](/reference/api/csharp/aspire.hosting/waitbehavior.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/WaitAnnotation.cs)

The behavior of the wait. Only applicable when [WaitAnnotation.WaitType](/reference/api/csharp/aspire.hosting/waitannotation/properties.md#waittype) is [WaitType.WaitUntilHealthy](/reference/api/csharp/aspire.hosting/waittype/fields.md).

```csharp
public WaitBehavior? WaitBehavior { get; init; }
```

## WaitType

- Name: `WaitType`
- Modifiers: `get`
- Returns: [WaitType](/reference/api/csharp/aspire.hosting/waittype.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/WaitAnnotation.cs#L28)

The type of wait to apply to the dependency resource.

```csharp
public WaitType WaitType { get; }
```
