AtsContext
Classsealednet10.0
Contains all scanned types, capabilities, and metadata from ATS assembly scanning.
namespace Aspire.TypeSystem;
public sealed class AtsContext{ // ...}10 members
Remarks
Section titled RemarksThe ATS type system has four distinct categories of exported metadata, each with different serialization and code generation behavior:
- Handle Types (
Ats) — 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.Context. Handle Types - DTO Types (
Ats) — 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.Context. Dto Types - Enum Types (
Ats) — Enum types discovered in capability signatures. These are serialized as strings. The TypeScript SDK generates TypeScript enums with string values.Context. Enum Types - Exported Values (
Ats) — Immutable values marked withContext. Exported Values [Aspire. These are snapped during scanning and emitted as predefined value catalogs in generated guest SDKs.Value]
Constructors1
Section titled ConstructorsProperties8
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.
DtoTypes get; 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.
EnumTypes get; 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.
ExportedValues get; init Gets the exported immutable values discovered during scanning.
HandleTypes get; 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.
PropertiesgetDictionary<string, PropertyInfo> Runtime registry mapping capability IDs to properties.
Methods1
Section titled Methods Gets the type category for a CLR type based on scanned data. Used at runtime for marshalling.