Skip to content
Docs Try Aspire

AtsTypeCategory

Enum net8.0
📦 Aspire.TypeSystem v13.2.0
Categories of ATS types for serialization and handling.
namespace Aspire.TypeSystem;
public enum AtsTypeCategory
Primitive = 0
Primitive types that serialize directly to JSON values. Examples: string, number, boolean, datetime, guid.
Enum = 1
Enum types that serialize as string values.
Handle = 2
Handle types that are opaque references to .NET objects. Serialized as { "$handle": "type:id", "$type": "type" }.
Dto = 3
Data Transfer Objects that serialize as JSON objects. Must be marked with [AspireDto].
Callback = 4
Callback types (delegates) that are registered and invoked by ID.
Array = 5
Readonly array/collection types that serialize as JSON arrays (copied). Examples: T[], IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>.
List = 6
Mutable list types that are handles to .NET List<T>.
Dict = 7
Dictionary types that serialize as JSON objects. Mutable dictionaries are handles; readonly dictionaries are copied.
Union = 8
Union types that can hold one of multiple alternative types. Serialization depends on the member types.
Unknown = 9
Unknown types that couldn't be resolved during the first pass of scanning. In Pass 2, these are either resolved to Handle (if the type is in the universe) or filtered out (if the type is not a valid ATS type).