Skip to content
Docs Try Aspire

AtsTypeRef Properties

Class Properties 12 members
Lightweight type reference with category and interface flag. Used for parameter types and return types in capabilities.
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; }
ClrType Section titled ClrType nullable Type?
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; }
IsDistributedApplication Section titled IsDistributedApplication bool
Gets whether this type is DistributedApplication.
public bool IsDistributedApplication { get; }
IsDistributedApplicationBuilder Section titled IsDistributedApplicationBuilder bool
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; }
IsResourceBuilder Section titled IsResourceBuilder bool
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; }