AtsTypeRef
Class sealed net8.0
Lightweight type reference with category and interface flag. Used for parameter types and return types in capabilities.
namespace Aspire.TypeSystem;
public sealed class AtsTypeRef{ // ...} 13 members
Constructors1
Section titled ConstructorsProperties12
Section titled PropertiesCategoryget; set 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.
ClrTypeget; initType? Gets or sets the CLR type reference for direct type access.
ElementTypeget; init Gets or sets the element type reference for Array/List types.
IsDistributedApplicationgetbool Gets whether this type is DistributedApplication.
IsDistributedApplicationBuildergetbool Gets whether this type is IDistributedApplicationBuilder.
IsInterfaceget; initbool Gets or sets whether this is an interface type. Only meaningful for Handle category types.
IsReadOnlyget; initbool Gets or sets whether this is a readonly collection (copied, not a handle). Only meaningful for Array/Dict categories.
IsResourceBuildergetbool Gets whether this type represents a resource builder target type. Computed from ClrType - true for types that implement the Aspire resource contract.
KeyTypeget; init Gets or sets the key type reference for Dict types.
TypeIdget; initstring Gets or sets the ATS type ID (e.g., "string", "Aspire.Hosting/RedisResource").
UnionTypesget; init Gets or sets the member types for Union category. When Category = Union, this contains the alternative types.
ValueTypeget; init Gets or sets the value type reference for Dict types.