Skip to content
Docs Try Aspire

AtsConstants Methods

Class Methods 14 members
Constants for ATS (Aspire Type System) type IDs and capability IDs.
ArrayTypeId(string) Section titled ArrayTypeId(string) static string
Creates an array type ID for the given element type.
public static class AtsConstants
{
public static string ArrayTypeId(
string elementType)
{
// ...
}
}
elementType string The element type ID.
string The array type ID.
DictTypeId(string, string) Section titled DictTypeId(string, string) static string
Creates a Dict type ID for the given key and value types.
public static class AtsConstants
{
public static string DictTypeId(
string keyType,
string valueType)
{
// ...
}
}
keyType string The key type ID.
valueType string The value type ID.
string The Dict type ID.
EnumTypeId(string) Section titled EnumTypeId(string) static string
Creates an enum type ID for the given enum type full name.
public static class AtsConstants
{
public static string EnumTypeId(
string enumFullName)
{
// ...
}
}
enumFullName string The full name of the enum type.
string The enum type ID.
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.
public static class AtsConstants
{
public static AtsTypeCategory GetCategory(
string? typeId,
bool isCallback = false)
{
// ...
}
}
typeId string? The ATS type ID.
isCallback bool optional True if this is a callback parameter.
AtsTypeCategory The type category.
Gets the type category for a CLR type.
public static class AtsConstants
{
public static AtsTypeCategory GetCategory(
Type type)
{
// ...
}
}
type Type The CLR type.
AtsTypeCategory The type category.
IsArray(string?) Section titled IsArray(string?) static bool
Checks if a type ID represents an array type.
public static class AtsConstants
{
public static bool IsArray(
string? typeId)
{
// ...
}
}
typeId string? The ATS type ID to check.
bool True if the type is an array.
IsDict(string?) Section titled IsDict(string?) static bool
Checks if a type ID represents a Dict type.
public static class AtsConstants
{
public static bool IsDict(
string? typeId)
{
// ...
}
}
typeId string? The ATS type ID to check.
bool True if the type is a Dict.
IsEnum(string?) Section titled IsEnum(string?) static bool
Checks if a type ID represents an enum type.
public static class AtsConstants
{
public static bool IsEnum(
string? typeId)
{
// ...
}
}
typeId string? The ATS type ID to check.
bool True if the type is an enum.
IsHandle(string?) Section titled IsHandle(string?) static bool
Checks if a type ID represents a handle type (has Assembly/Type format).
public static class AtsConstants
{
public static bool IsHandle(
string? typeId)
{
// ...
}
}
typeId string? The ATS type ID to check.
bool True if the type is a handle.
IsList(string?) Section titled IsList(string?) static bool
Checks if a type ID represents a List type.
public static class AtsConstants
{
public static bool IsList(
string? typeId)
{
// ...
}
}
typeId string? The ATS type ID to check.
bool True if the type is a List.
IsPrimitive(string?) Section titled IsPrimitive(string?) static bool
Checks if a type ID represents a primitive type.
public static class AtsConstants
{
public static bool IsPrimitive(
string? typeId)
{
// ...
}
}
typeId string? The ATS type ID to check.
bool True if the type is a primitive.
IsPrimitiveType(Type) Section titled IsPrimitiveType(Type) static bool
Checks if a CLR type is a primitive ATS type.
public static class AtsConstants
{
public static bool IsPrimitiveType(
Type type)
{
// ...
}
}
type Type The CLR type to check.
bool True if the type is a primitive.
IsReadOnlyDictType(Type) Section titled IsReadOnlyDictType(Type) static bool
Checks if a dictionary type is readonly.
public static class AtsConstants
{
public static bool IsReadOnlyDictType(
Type type)
{
// ...
}
}
type Type
ListTypeId(string) Section titled ListTypeId(string) static string
Creates a List type ID for the given element type.
public static class AtsConstants
{
public static string ListTypeId(
string elementType)
{
// ...
}
}
elementType string The element type ID.
string The List type ID.