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