AtsConstants
Classstaticnet10.0
Constants for ATS (Aspire Type System) type IDs and capability IDs.
namespace Aspire.TypeSystem;
public static class AtsConstants{ // ...}36 members
Methods14
Section titled Methods Gets the type category for a type ID. Note: This method cannot distinguish DTOs from Handles based on type ID alone. Use the scanner's type mapping to determine if a handle type is actually a DTO.
IsHandle(string?) staticbool Checks if a type ID represents a handle type (has Assembly/Type format).
Fields22
Section titled FieldsAnystaticstring Any type ID. Maps from .NET
Object. Accepts any supported ATS type. Use when a parameter needs to accept multiple types without explicit union declaration. CancellationToken staticstring CancellationToken type ID. Maps from .NET
Threading.CancellationToken . In TypeScript, maps to AbortSignal for cancellation support. DateOnly staticstring DateOnly type ID. Maps from .NET
DateOnly . Serializes to JSON string (YYYY-MM-DD). DateTime staticstring DateTime type ID. Maps from .NET
DateTime . Serializes to JSON string (ISO 8601). DateTimeOffset staticstring DateTimeOffset type ID. Maps from .NET
DateTimeOffset . Serializes to JSON string (ISO 8601). EnumPrefix staticstring Enum type ID prefix. Maps from .NET enum types. Full format: "enum:{FullTypeName}". Serializes to JSON string (enum name).
Numberstaticstring Number type ID. Maps from .NET numeric types (int, long, float, double, decimal, etc.). Serializes to JSON number.
TimeOnly staticstring TimeOnly type ID. Maps from .NET
TimeOnly . Serializes to JSON string (HH:mm:ss). TimeSpan staticstring TimeSpan type ID. Maps from .NET
TimeSpan . Serializes to JSON number (total milliseconds).