65 references to AtsConstants
Aspire.Hosting (39)
Ats\AtsCapabilityInfo.cs (1)
193/// Use <see cref="AtsConstants.Void"/> TypeId for void return types.
Ats\AtsCapabilityScanner.cs (37)
85var typeId = AtsConstants.EnumTypeId(fullName); 442if (typeId.StartsWith(AtsConstants.EnumPrefix, StringComparison.Ordinal)) 444var fullName = typeId[AtsConstants.EnumPrefix.Length..]; 977: new AtsTypeRef { TypeId = AtsConstants.Any, Category = AtsTypeCategory.Primitive }; 981TypeId = AtsConstants.DictTypeId(keyTypeRef.TypeId, valueTypeRef.TypeId), 1004propertyTypeRef = new AtsTypeRef { TypeId = AtsConstants.Any, Category = AtsTypeCategory.Primitive }; 1483returnTypeRef = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 1487returnTypeRef = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 1495?? new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive } 1496: new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 1501?? new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 1527var voidTypeRef = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 1627if (AtsConstants.IsPrimitiveType(type)) 1635return AtsConstants.Any; 1641return AtsConstants.EnumTypeId(type.FullName ?? type.Name); 1663return AtsConstants.DictTypeId(keyTypeName, valueTypeName); 1679return AtsConstants.ListTypeId(elementTypeName); 1750return AtsConstants.String; 1754return AtsConstants.Char; 1758return AtsConstants.Boolean; 1767return AtsConstants.Number; 1773return AtsConstants.DateTime; 1777return AtsConstants.DateTimeOffset; 1781return AtsConstants.DateOnly; 1785return AtsConstants.TimeOnly; 1789return AtsConstants.TimeSpan; 1795return AtsConstants.Guid; 1799return AtsConstants.Uri; 1803return AtsConstants.CancellationToken; 1828TypeId = AtsConstants.Void, 1884return new AtsTypeRef { TypeId = AtsConstants.Any, ClrType = type, Category = AtsTypeCategory.Primitive }; 1895TypeId = AtsConstants.EnumTypeId(type.FullName ?? type.Name), 1918TypeId = AtsConstants.DictTypeId(keyTypeRef.TypeId, valueTypeRef.TypeId), 1941TypeId = AtsConstants.DictTypeId(keyTypeRef.TypeId, valueTypeRef.TypeId), 1963TypeId = AtsConstants.ListTypeId(elementTypeRef.TypeId), 1983TypeId = AtsConstants.ArrayTypeId(elementTypeRef.TypeId), 2042TypeId = AtsConstants.ArrayTypeId(elementTypeRef.TypeId),
Ats\AtsContext.cs (1)
102if (AtsConstants.IsPrimitiveType(type))
Aspire.Hosting.CodeGeneration.TypeScript (21)
AtsTypeScriptCodeGenerator.cs (21)
166AtsConstants.String or AtsConstants.Char => "string", 167AtsConstants.Number => "number", 168AtsConstants.Boolean => "boolean", 169AtsConstants.Void => "void", 170AtsConstants.Any => "any", 171AtsConstants.DateTime or AtsConstants.DateTimeOffset or 172AtsConstants.DateOnly or AtsConstants.TimeOnly => "string", 173AtsConstants.TimeSpan => "number", 174AtsConstants.Guid or AtsConstants.Uri => "string", 175AtsConstants.CancellationToken => "AbortSignal", 439_wrapperClassNames[AtsConstants.ReferenceExpressionTypeId] = "ReferenceExpression"; 1161var returnType = callbackReturnType == null || callbackReturnType.TypeId == AtsConstants.Void 1219return param.Type?.TypeId == AtsConstants.CancellationToken; 1250&& callbackParam.CallbackReturnType.TypeId != AtsConstants.Void; 1316var builderHandle = GetHandleTypeName(AtsConstants.BuilderTypeId); 1947var isVoid = capability.ReturnType == null || capability.ReturnType.TypeId == AtsConstants.Void; 2144var isVoid = capability.ReturnType == null || capability.ReturnType.TypeId == AtsConstants.Void;
Aspire.Hosting.CodeGeneration.TypeScript.Tests (4)
AtsTypeScriptCodeGeneratorTests.cs (4)
1013Assert.Equal(AtsConstants.CancellationToken, ctParam.Type.TypeId); 1046Assert.Equal(AtsConstants.CancellationToken, operationParam.CallbackParameters[0].Type?.TypeId); 1065Assert.Equal(AtsConstants.TimeSpan, timeoutParam.Type?.TypeId); 1069Assert.Equal(AtsConstants.CancellationToken, ctParam.Type?.TypeId);
Aspire.Hosting.RemoteHost (1)
Ats\AtsMarshaller.cs (1)
128if (typeRef.TypeId == Hosting.Ats.AtsConstants.Any)