AtsTypeRef Properties
Class Properties 14 members
Lightweight type reference with category and interface flag. Used for parameter types and return types in capabilities.
Gets or sets the immediate base type of this type.
public AtsTypeRef? BaseType { get; init; }Remarks
Pre-computed during type scanning so generators can traverse the type hierarchy from the shared ATS model without performing additional reflection. Currently used by Python code generation when mapping inherited members. Returns
null for interface types or for types with no relevant base class. Gets or sets the type category (Primitive, Handle, Dto, Callback, Array, List, Dict, Unknown). Note: This is mutable to allow Pass 2 resolution of Unknown types to Handle.
public AtsTypeCategory Category { get; set; } Gets or sets the CLR type reference for direct type access.
public Type? ClrType { get; init; } Gets or sets the element type reference for Array/List types.
public AtsTypeRef? ElementType { get; init; } Gets or sets the interfaces this type implements.
public IReadOnlyList<AtsTypeRef> ImplementedInterfaces { get; init; }Remarks
Pre-computed during type scanning so generators can consume interface information from the shared ATS model without performing additional reflection. Currently used by Python code generation for interface inheritance and capability placement. Only meaningful for Handle category types.
Gets whether this type is DistributedApplication.
public bool IsDistributedApplication { get; } Gets whether this type is IDistributedApplicationBuilder.
public bool IsDistributedApplicationBuilder { get; } Gets or sets whether this is an interface type. Only meaningful for Handle category types.
public bool IsInterface { get; init; } Gets or sets whether this is a readonly collection (copied, not a handle). Only meaningful for Array/Dict categories.
public bool IsReadOnly { get; init; } Gets whether this type represents a resource builder target type. Computed from ClrType - true for types that implement the Aspire resource contract.
public bool IsResourceBuilder { get; } Gets or sets the key type reference for Dict types.
public AtsTypeRef? KeyType { get; init; } Gets or sets the ATS type ID (e.g., "string", "Aspire.Hosting/RedisResource").
public string TypeId { get; init; } Gets or sets the member types for Union category. When Category = Union, this contains the alternative types.
public IReadOnlyList<AtsTypeRef>? UnionTypes { get; init; } Gets or sets the value type reference for Dict types.
public AtsTypeRef? ValueType { get; init; }