Skip to content
DocsTry Aspire
DocsTry

AtsConstants Methods

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