# HiddenAnnotation

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.5.3`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/b5f143315ffb6968ea939a9978797a5b20e4c688/src/Aspire.Hosting/ApplicationModel/HiddenAnnotation.cs)
- Implements: [IResourceAnnotation](/reference/api/csharp/aspire.hosting/iresourceannotation.md)

Represents visibility metadata that hides a resource from default resource lists.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public sealed class HiddenAnnotation
    : Aspire.Hosting.ApplicationModel.IResourceAnnotation
{
    // ...
}
```

## Remarks

Hidden resources can still be accessed directly by name or included explicitly by tooling that supports showing hidden resources.

## Constructors

- [HiddenAnnotation(HiddenBehavior)](/reference/api/csharp/aspire.hosting/hiddenannotation/constructors.md#constructor-hiddenbehavior) -- Represents visibility metadata that hides a resource from default resource lists.

## Properties

- [Behavior](/reference/api/csharp/aspire.hosting/hiddenannotation/properties.md#behavior) : [HiddenBehavior](/reference/api/csharp/aspire.hosting/hiddenbehavior.md) `get` -- Gets when the resource should be hidden from default resource lists.
- [SuccessfulExitCodes](/reference/api/csharp/aspire.hosting/hiddenannotation/properties.md#successfulexitcodes) : `IReadOnlyList<int>` `get; init` -- Gets the exit codes that are treated as successful completion when [HiddenAnnotation.Behavior](/reference/api/csharp/aspire.hosting/hiddenannotation/properties.md#behavior) is [HiddenBehavior.OnCompletion](/reference/api/csharp/aspire.hosting/hiddenbehavior/fields.md).
