# AtsConstants

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

Constants for ATS (Aspire Type System) type IDs and capability IDs.

## Definition

```csharp
namespace Aspire.TypeSystem;

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

## Methods

- [ArrayTypeId(string)](/reference/api/csharp/aspire.typesystem/atsconstants/methods.md#arraytypeid-string) : `string` `static` -- Creates an array type ID for the given element type.
- [DictTypeId(string, string)](/reference/api/csharp/aspire.typesystem/atsconstants/methods.md#dicttypeid-string-string) : `string` `static` -- Creates a Dict type ID for the given key and value types.
- [EnumTypeId(string)](/reference/api/csharp/aspire.typesystem/atsconstants/methods.md#enumtypeid-string) : `string` `static` -- Creates an enum type ID for the given enum type full name.
- [GetCategory(string?, bool)](/reference/api/csharp/aspire.typesystem/atsconstants/methods.md#getcategory-string-bool) : [AtsTypeCategory](/reference/api/csharp/aspire.typesystem/atstypecategory.md) `static` -- Gets the type category for a type ID. Note: This method cannot distinguish DTOs from Handles based on type ID alone. Use the scanner's type mapping to determine if a handle type is actually a DTO.
- [GetCategory(Type)](/reference/api/csharp/aspire.typesystem/atsconstants/methods.md#getcategory-type) : [AtsTypeCategory](/reference/api/csharp/aspire.typesystem/atstypecategory.md) `static` -- Gets the type category for a CLR type.
- [IsArray(string?)](/reference/api/csharp/aspire.typesystem/atsconstants/methods.md#isarray-string) : `bool` `static` -- Checks if a type ID represents an array type.
- [IsDict(string?)](/reference/api/csharp/aspire.typesystem/atsconstants/methods.md#isdict-string) : `bool` `static` -- Checks if a type ID represents a Dict type.
- [IsEnum(string?)](/reference/api/csharp/aspire.typesystem/atsconstants/methods.md#isenum-string) : `bool` `static` -- Checks if a type ID represents an enum type.
- [IsHandle(string?)](/reference/api/csharp/aspire.typesystem/atsconstants/methods.md#ishandle-string) : `bool` `static` -- Checks if a type ID represents a handle type (has Assembly/Type format).
- [IsList(string?)](/reference/api/csharp/aspire.typesystem/atsconstants/methods.md#islist-string) : `bool` `static` -- Checks if a type ID represents a List type.
- [IsPrimitive(string?)](/reference/api/csharp/aspire.typesystem/atsconstants/methods.md#isprimitive-string) : `bool` `static` -- Checks if a type ID represents a primitive type.
- [IsPrimitiveType(Type)](/reference/api/csharp/aspire.typesystem/atsconstants/methods.md#isprimitivetype-type) : `bool` `static` -- Checks if a CLR type is a primitive ATS type.
- [IsReadOnlyDictType(Type)](/reference/api/csharp/aspire.typesystem/atsconstants/methods.md#isreadonlydicttype-type) : `bool` `static` -- Checks if a dictionary type is readonly.
- [ListTypeId(string)](/reference/api/csharp/aspire.typesystem/atsconstants/methods.md#listtypeid-string) : `string` `static` -- Creates a List type ID for the given element type.

## Fields

- [Any](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#any) : `string` `static` -- Any type ID. Maps from .NET `Object`. Accepts any supported ATS type. Use when a parameter needs to accept multiple types without explicit union declaration.
- [ApplicationTypeId](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#applicationtypeid) : `string` `static` -- Type ID for DistributedApplication.
- [AspireHostingAssembly](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#aspirehostingassembly) : `string` `static` -- The Aspire.Hosting assembly name.
- [Boolean](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#boolean) : `string` `static` -- Boolean type ID. Maps from .NET `Boolean`.
- [BuildCapability](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#buildcapability) : `string` `static` -- Capability ID for building the application.
- [BuilderTypeId](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#buildertypeid) : `string` `static` -- Type ID for IDistributedApplicationBuilder.
- [CancellationToken](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#cancellationtoken) : `string` `static` -- CancellationToken type ID. Maps from .NET `Threading.CancellationToken`. In TypeScript, maps to AbortSignal for cancellation support.
- [Char](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#char) : `string` `static` -- Char type ID. Maps from .NET `Char`. Serializes to JSON string.
- [CreateBuilderCapability](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#createbuildercapability) : `string` `static` -- Capability ID for creating a builder.
- [DateOnly](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#dateonly) : `string` `static` -- DateOnly type ID. Maps from .NET `DateOnly`. Serializes to JSON string (YYYY-MM-DD).
- [DateTime](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#datetime) : `string` `static` -- DateTime type ID. Maps from .NET `DateTime`. Serializes to JSON string (ISO 8601).
- [DateTimeOffset](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#datetimeoffset) : `string` `static` -- DateTimeOffset type ID. Maps from .NET `DateTimeOffset`. Serializes to JSON string (ISO 8601).
- [EnumPrefix](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#enumprefix) : `string` `static` -- Enum type ID prefix. Maps from .NET enum types. Full format: "enum:{FullTypeName}". Serializes to JSON string (enum name).
- [Guid](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#guid) : `string` `static` -- Guid type ID. Maps from .NET `Guid`. Serializes to JSON string.
- [Number](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#number) : `string` `static` -- Number type ID. Maps from .NET numeric types (int, long, float, double, decimal, etc.). Serializes to JSON number.
- [ReferenceExpressionTypeId](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#referenceexpressiontypeid) : `string` `static` -- Type ID for ReferenceExpression.
- [RunCapability](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#runcapability) : `string` `static` -- Capability ID for running the application.
- [String](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#string) : `string` `static` -- String type ID. Maps from .NET `String`.
- [TimeOnly](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#timeonly) : `string` `static` -- TimeOnly type ID. Maps from .NET `TimeOnly`. Serializes to JSON string (HH:mm:ss).
- [TimeSpan](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#timespan) : `string` `static` -- TimeSpan type ID. Maps from .NET `TimeSpan`. Serializes to JSON number (total milliseconds).
- [Uri](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#uri) : `string` `static` -- Uri type ID. Maps from .NET `Uri`. Serializes to JSON string.
- [Void](/reference/api/csharp/aspire.typesystem/atsconstants/fields.md#void) : `string` `static` -- Void type ID. Represents no return value.
