AtsContext
Class sealed net8.0
Contains all scanned types, capabilities, and metadata from ATS assembly scanning.
namespace Aspire.TypeSystem;
public sealed class AtsContext{ // ...} 9 members
Remarks
Section titled RemarksThe ATS type system has three distinct categories of types, 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.
Constructors1
Section titled ConstructorsProperties7
Section titled PropertiesCapabilitiesget; init Gets the capabilities discovered during scanning. Capabilities are methods or properties marked with [AspireExport] that can be invoked via RPC.
Diagnosticsget; init Gets any diagnostics (warnings/errors) generated during scanning.
DtoTypesget; init Gets the DTO types discovered during scanning. These are types marked with [AspireDto] that are serialized as JSON objects. Code generators create interfaces for these types.
EnumTypesget; init Gets the enum types discovered during scanning. These are enum types found in capability signatures, serialized as strings. Code generators create enum definitions for these types.
HandleTypesget; init Gets the handle types discovered during scanning. These are types marked with [AspireExport] that are passed by reference using opaque handles. Code generators create wrapper classes for these types.
MethodsgetDictionary<string, MethodInfo> Runtime registry mapping capability IDs to methods.
PropertiesgetDictionary<string, PropertyInfo> Runtime registry mapping capability IDs to properties.