Watch Aspire live streamsDocsTry Aspire

AtsContext

Classsealednet10.0
📦 Aspire.TypeSystem v13.6.0
Contains all scanned types, capabilities, and metadata from ATS assembly scanning.
namespace Aspire.TypeSystem;
public sealed class AtsContext
{
// ...
}

The ATS type system has four distinct categories of exported metadata, each with different serialization and code generation behavior:

  • Handle Types ( AtsContext.HandleTypes) — Types marked with [AspireExport]. These are passed by reference using opaque handles. The TypeScript SDK generates wrapper classes that hold handles and proxy method calls back to .NET. Examples: IDistributedApplicationBuilder, ContainerResource, EndpointReference.
  • DTO Types ( AtsContext.DtoTypes) — Types marked with [AspireDto]. These are serialized as JSON objects and passed by value. The TypeScript SDK generates interfaces matching the DTO's properties. Examples: CreateBuilderOptions, ResourceSnapshot.
  • Enum Types ( AtsContext.EnumTypes) — Enum types discovered in capability signatures. These are serialized as strings. The TypeScript SDK generates TypeScript enums with string values.
  • Exported Values ( AtsContext.ExportedValues) — Immutable values marked with [AspireValue]. These are snapped during scanning and emitted as predefined value catalogs in generated guest SDKs.
View all constructors
View all properties
View all methods