397 references to AtsConstants
Aspire.Hosting.CodeGeneration.Go (45)
AtsGoCodeGenerator.ApiProjection.cs (7)
231TypeId = AtsConstants.CreateBuilderCapability, 246var typeId = isBuilder ? AtsConstants.BuilderTypeId : AtsConstants.ApplicationTypeId; 723var hasReturn = returnType is not null && returnType.TypeId != AtsConstants.Void; 848if (string.Equals(typeId, AtsConstants.BuilderTypeId, StringComparison.Ordinal)) 853CapabilityId = AtsConstants.BuildCapability, 854TargetTypeId = AtsConstants.BuilderTypeId,
AtsGoCodeGenerator.cs (38)
173if (dto.TypeId == AtsConstants.ReferenceExpressionTypeId) 187if (handleType.AtsTypeId == AtsConstants.ReferenceExpressionTypeId 447if (typeRef.TypeId == AtsConstants.ReferenceExpressionTypeId 694var returnsValue = capability.ReturnType is not null && capability.ReturnType.TypeId != AtsConstants.Void; 797if (dto.TypeId == AtsConstants.ReferenceExpressionTypeId) 1308if (string.Equals(typeId, AtsConstants.BuilderTypeId, StringComparison.Ordinal)) 1310var appInterface = _interfaceNames.TryGetValue(AtsConstants.ApplicationTypeId, out var appName) 1579&& p.CallbackReturnType.TypeId != AtsConstants.Void; 1596var hasReturn = capability.ReturnType is not null && capability.ReturnType.TypeId != AtsConstants.Void; 1983&& p.CallbackReturnType.TypeId != AtsConstants.Void; 2387var hasReturn = capability.ReturnType is not null && capability.ReturnType.TypeId != AtsConstants.Void; 2411WriteLine("\tc.registerHandleWrapper(\"" + AtsConstants.ReferenceExpressionTypeId + "\", func(h *handle, c *client) any {"); 2441var builderTypeId = AtsConstants.BuilderTypeId; 2448var appTypeId = AtsConstants.ApplicationTypeId; 2498WriteLine($"\tresult, err := b.client.invokeCapability(context.Background(), \"{AtsConstants.BuildCapability}\", map[string]any{{"); 2556WriteLine($"\tresult, err := c.invokeCapability(context.Background(), \"{AtsConstants.CreateBuilderCapability}\", map[string]any{{\"argsOrOptions\": resolved}})"); 2601if (typeRef.TypeId == AtsConstants.ReferenceExpressionTypeId) 2642if (typeRef.TypeId == AtsConstants.ReferenceExpressionTypeId) 2676&& typeRef.TypeId is not (AtsConstants.Void or AtsConstants.Any or AtsConstants.CancellationToken); 2704AtsConstants.String or AtsConstants.Char => "string", 2705AtsConstants.Number => "float64", 2706AtsConstants.Boolean => "bool", 2707AtsConstants.Void => "", 2708AtsConstants.Any => "any", 2709AtsConstants.DateTime or AtsConstants.DateTimeOffset or 2710AtsConstants.DateOnly or AtsConstants.TimeOnly => "string", 2711AtsConstants.TimeSpan => "float64", 2712AtsConstants.Guid or AtsConstants.Uri => "string", 2713AtsConstants.CancellationToken => "*CancellationToken", 2723string.Equals(capabilityId, AtsConstants.BuildCapability, StringComparison.Ordinal) 2724|| string.Equals(capabilityId, AtsConstants.CreateBuilderCapability, StringComparison.Ordinal); 2730string.Equals(typeId, AtsConstants.CancellationToken, StringComparison.Ordinal)
Aspire.Hosting.CodeGeneration.Go.Tests (18)
AtsGoDerivedBuilderTests.cs (7)
489private static readonly AtsTypeRef s_builder = new() { TypeId = AtsConstants.BuilderTypeId, Category = AtsTypeCategory.Handle, IsInterface = true }; 496private static readonly AtsTypeRef s_string = new() { TypeId = AtsConstants.String, Category = AtsTypeCategory.Primitive }; 531new AtsTypeInfo { AtsTypeId = AtsConstants.BuilderTypeId, IsInterface = true }, 618TypeId = AtsConstants.ArrayTypeId(element.TypeId), 626TypeId = AtsConstants.ListTypeId(element.TypeId), 633TypeId = AtsConstants.DictTypeId(key.TypeId, value.TypeId), 657CallbackReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }
GoDocCommentTests.cs (6)
358var stringType = Primitive(AtsConstants.String); 359var boolType = Primitive(AtsConstants.Boolean); 360var voidType = Primitive(AtsConstants.Void); 374Parameter("port", Primitive(AtsConstants.Number), "The port to use. Pass `name` to override.", isOptional: true), 398Capability("port", Primitive(AtsConstants.Number), new AtsDocumentationInfo { Summary = "The port of the resource." }, 431new AtsDtoPropertyInfo { Name = "Port", Type = Primitive(AtsConstants.Number), Description = "The port of the resource." },
GoGeneratorEscapingTests.cs (5)
91var stringType = Primitive(AtsConstants.String); 92var numberType = Primitive(AtsConstants.Number); 93var voidType = Primitive(AtsConstants.Void); 127Capability("Tests/getExpression\"%d", "getExpression", Handle(AtsConstants.ReferenceExpressionTypeId), description: "Gets an expression."), 136parameters: [Parameter("cancel\"Token", Primitive(AtsConstants.CancellationToken), isOptional: true)])
Aspire.Hosting.CodeGeneration.Java (41)
AtsJavaCodeGenerator.cs (41)
733if (dto.TypeId == AtsConstants.ReferenceExpressionTypeId) 1337var builderClassName = _classNames.TryGetValue(AtsConstants.BuilderTypeId, out var name) 1895var hasReturn = capability.ReturnType?.TypeId != AtsConstants.Void; 1910var hasReturnType = callbackReturnType != null && callbackReturnType.TypeId != AtsConstants.Void; 1944var hasReturnType = callbackParam.CallbackReturnType != null && callbackParam.CallbackReturnType.TypeId != AtsConstants.Void; 2000var hasReturnType = property.CallbackReturnType != null && property.CallbackReturnType.TypeId != AtsConstants.Void; 2030if (callbackParameter.Type?.TypeId == AtsConstants.CancellationToken) 2050if (typeRef.TypeId == AtsConstants.ReferenceExpressionTypeId) 2172AtsConstants.String or AtsConstants.Char or 2173AtsConstants.DateTime or AtsConstants.DateTimeOffset or 2174AtsConstants.DateOnly or AtsConstants.TimeOnly or 2175AtsConstants.Guid or AtsConstants.Uri => $"(String) {valueExpression}", 2176AtsConstants.Number or AtsConstants.TimeSpan => $"((Number) {valueExpression}).doubleValue()", 2177AtsConstants.Boolean => $"(Boolean) {valueExpression}", 2178AtsConstants.Void => "null", 2229if (typeRef.TypeId == AtsConstants.CancellationToken) 2339var builderClassName = _classNames.TryGetValue(AtsConstants.BuilderTypeId, out var name) 2418if (handleType.AtsTypeId == AtsConstants.ReferenceExpressionTypeId 2569if (typeRef.TypeId == AtsConstants.ReferenceExpressionTypeId) 2601if (typeRef.TypeId == AtsConstants.ReferenceExpressionTypeId) 2659AtsConstants.String or AtsConstants.Char => "String", 2668AtsConstants.Number => useBoxedTypes ? "Number" : "double", 2669AtsConstants.Boolean => useBoxedTypes ? "Boolean" : "boolean", 2670AtsConstants.Void => "void", 2671AtsConstants.Any => "Object", 2672AtsConstants.DateTime or AtsConstants.DateTimeOffset or 2673AtsConstants.DateOnly or AtsConstants.TimeOnly => "String", 2674AtsConstants.TimeSpan => useBoxedTypes ? "Number" : "double", 2675AtsConstants.Guid or AtsConstants.Uri => "String", 2676AtsConstants.CancellationToken => "CancellationToken", 2686string.Equals(typeId, AtsConstants.CancellationToken, StringComparison.Ordinal) 2697if (typeRef.TypeId == AtsConstants.ReferenceExpressionTypeId
Aspire.Hosting.CodeGeneration.Java.Tests (17)
AtsJavaCodeGeneratorTests.cs (17)
2776var stringType = new AtsTypeRef { TypeId = AtsConstants.String, Category = AtsTypeCategory.Primitive }; 2785CallbackReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive } 2792ReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }, 2817Type = new AtsTypeRef { TypeId = AtsConstants.CancellationToken, Category = AtsTypeCategory.Dto } 2824ReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }, 2859TypeId = AtsConstants.Number, 2895new AtsTypeRef { TypeId = AtsConstants.Boolean, Category = AtsTypeCategory.Primitive, IsNullable = true }), 2899new AtsTypeRef { TypeId = AtsConstants.Number, Category = AtsTypeCategory.Primitive, IsNullable = true }), 3028TypeId = AtsConstants.Number, 3034TypeId = AtsConstants.Boolean, 3066CallbackReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive } 3073ReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }, 3331Type = new AtsTypeRef { TypeId = AtsConstants.String, Category = AtsTypeCategory.Primitive } 3352TypeId = AtsConstants.Void, 3417CallbackReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive } 3424ReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }, 3446Type = new AtsTypeRef { TypeId = AtsConstants.String, Category = AtsTypeCategory.Primitive }
Aspire.Hosting.CodeGeneration.Python (26)
AtsPythonCodeGenerator.cs (26)
148AtsConstants.ReferenceExpressionTypeId, 247&& typeRef.TypeId is not (AtsConstants.Void or AtsConstants.Any or AtsConstants.CancellationToken); 254AtsConstants.String or AtsConstants.Char => "str", 255AtsConstants.Number => "int", 256AtsConstants.Boolean => "bool", 257AtsConstants.Void => "None", 258AtsConstants.Any => "typing.Any", 259AtsConstants.DateTime => "datetime.datetime", 260AtsConstants.DateTimeOffset => "datetime.datetime", 261AtsConstants.DateOnly => "datetime.date", 262AtsConstants.TimeOnly => "datetime.time", 263AtsConstants.TimeSpan => "float", 264AtsConstants.Guid or AtsConstants.Uri => "str", 265AtsConstants.CancellationToken => "CancellationToken", 275if (param.Type?.TypeId == AtsConstants.CancellationToken) 288if (param.Type?.TypeId == AtsConstants.CancellationToken) 297var writeback = parameter.CallbackReturnType?.TypeId == AtsConstants.Void && 298parameter.CallbackParameters?.Any(p => p.Type.Category == AtsTypeCategory.Dto && p.Type.TypeId != AtsConstants.CancellationToken) == true 459filtered = filtered.Where(p => p.Type?.TypeId != AtsConstants.CancellationToken); 471if (param.Type?.TypeId == AtsConstants.CancellationToken) 533if (typeRef.Category == AtsTypeCategory.Primitive && typeRef.TypeId == AtsConstants.Void) 666if (param.Type?.TypeId == AtsConstants.CancellationToken)
Aspire.Hosting.CodeGeneration.Python.Tests (9)
AtsPythonCodeGeneratorTests.cs (9)
893TypeId = AtsConstants.String, 949TypeId = AtsConstants.String, 1023TypeId = AtsConstants.Void, 1075TypeId = AtsConstants.Number, 1083TypeId = AtsConstants.String, 1122TypeId = AtsConstants.Number, 1132TypeId = AtsConstants.Void, 1168TypeId = AtsConstants.String, 1174TypeId = AtsConstants.Boolean,
Aspire.Hosting.CodeGeneration.Rust (43)
AtsRustCodeGenerator.cs (43)
207if (dto.TypeId == AtsConstants.ReferenceExpressionTypeId) 378if (typeRef.TypeId == AtsConstants.ReferenceExpressionTypeId 474var hasReturn = capability.ReturnType.TypeId != AtsConstants.Void; 611else if (returnTypeRef?.TypeId == AtsConstants.CancellationToken) 715var builderStructName = _structNames.TryGetValue(AtsConstants.BuilderTypeId, out var name) 783if (handleType.AtsTypeId == AtsConstants.ReferenceExpressionTypeId 907if (typeRef.TypeId == AtsConstants.ReferenceExpressionTypeId) 945if (typeRef.TypeId == AtsConstants.ReferenceExpressionTypeId) 985if (typeRef.TypeId == AtsConstants.ReferenceExpressionTypeId) 1015AtsConstants.String or AtsConstants.Char => "String", 1016AtsConstants.Number => "f64", 1017AtsConstants.Boolean => "bool", 1018AtsConstants.Void => "()", 1019AtsConstants.Any => "Value", 1020AtsConstants.DateTime or AtsConstants.DateTimeOffset or 1021AtsConstants.DateOnly or AtsConstants.TimeOnly => "String", 1022AtsConstants.TimeSpan => "f64", 1023AtsConstants.Guid or AtsConstants.Uri => "String", 1024AtsConstants.CancellationToken => "CancellationToken", 1041AtsConstants.String or AtsConstants.Char => "&str", 1042AtsConstants.Number => "f64", 1043AtsConstants.Boolean => "bool", 1044AtsConstants.Void => "()", 1045AtsConstants.Any => "&Value", 1046AtsConstants.DateTime or AtsConstants.DateTimeOffset or 1047AtsConstants.DateOnly or AtsConstants.TimeOnly => "&str", 1048AtsConstants.TimeSpan => "f64", 1049AtsConstants.Guid or AtsConstants.Uri => "&str", 1050AtsConstants.CancellationToken => "&CancellationToken", 1064&& typeRef.TypeId is not (AtsConstants.Void or AtsConstants.Any or AtsConstants.CancellationToken); 1068&& typeRef.TypeId != AtsConstants.ReferenceExpressionTypeId 1086string.Equals(typeId, AtsConstants.CancellationToken, StringComparison.Ordinal) 1097if (typeRef.TypeId == AtsConstants.ReferenceExpressionTypeId
Aspire.Hosting.CodeGeneration.TypeScript (36)
AtsTypeScriptCodeGenerator.cs (14)
136capability.ReturnType.TypeId == AtsConstants.Void ? null : capability.Documentation?.Returns, 137suppressReturns: capability.ReturnType.TypeId == AtsConstants.Void, 950var isVoid = capability.ReturnType == null || capability.ReturnType.TypeId == AtsConstants.Void; 1227if (capability.ReturnType?.TypeId == AtsConstants.CancellationToken) 1811else if (capability.ReturnType?.TypeId == AtsConstants.CancellationToken) 1889&& callbackParam.CallbackReturnType.TypeId != AtsConstants.Void; 1926if (cbTypeId == AtsConstants.CancellationToken) 1953var builderHandle = TypeScriptApiProjector.GetHandleTypeName(AtsConstants.BuilderTypeId); 2287if (getter.ReturnType?.TypeId == AtsConstants.CancellationToken) 2367if (getter.ReturnType?.TypeId == AtsConstants.CancellationToken) 2716else if (method.ReturnType?.TypeId == AtsConstants.CancellationToken) 2904var isVoid = capability.ReturnType == null || capability.ReturnType.TypeId == AtsConstants.Void; 3065if (capability.ReturnType?.TypeId == AtsConstants.CancellationToken) 3130var isVoid = capability.ReturnType == null || capability.ReturnType.TypeId == AtsConstants.Void;
TypeScriptApiProjector.cs (22)
424if (capability.ReturnType is null || capability.ReturnType.TypeId == AtsConstants.Void) 1663if (typeRef.TypeId == AtsConstants.ReferenceExpressionTypeId) 1715return typeRef.TypeId is AtsConstants.Void or AtsConstants.Any or AtsConstants.CancellationToken 1764AtsConstants.String or AtsConstants.Char => "string", 1765AtsConstants.Number => "number", 1766AtsConstants.Boolean => "boolean", 1767AtsConstants.Void => "void", 1768AtsConstants.Any => "any", 1769AtsConstants.DateTime or AtsConstants.DateTimeOffset or 1770AtsConstants.DateOnly or AtsConstants.TimeOnly => "string", 1771AtsConstants.TimeSpan => "number", 1772AtsConstants.Guid or AtsConstants.Uri => "string", 1773AtsConstants.CancellationToken => GetCancellationTokenInterfaceName(), 2011internal static bool IsCancellationTokenType(AtsTypeRef? typeRef) => typeRef?.TypeId == AtsConstants.CancellationToken; 2674if (targetTypeId is AtsConstants.ReferenceExpressionTypeId or InteractionInputCollectionTypeId) 3112var returnType = callbackReturnType == null || callbackReturnType.TypeId == AtsConstants.Void
Aspire.Hosting.CodeGeneration.TypeScript.Tests (21)
AtsTypeScriptCodeGeneratorTests.cs (21)
288TypeId = AtsConstants.String, 659Assert.Equal(AtsConstants.Void, setValue.ReturnType.TypeId); 951TypeId = AtsConstants.Number, 957TypeId = $"{AtsConstants.Number}[]", 1051TypeId = AtsConstants.Number, 1059KeyType = new AtsTypeRef { TypeId = AtsConstants.String, Category = AtsTypeCategory.Primitive }, 2008TypeId = AtsConstants.Void, 2033TypeId = AtsConstants.Void, 2318c.TargetTypeId == AtsConstants.ReferenceExpressionTypeId); 2410Assert.Equal(AtsConstants.CancellationToken, ctParam.Type.TypeId); 2445Assert.Equal(AtsConstants.CancellationToken, operationParam.CallbackParameters[0].Type?.TypeId); 2464Assert.Equal(AtsConstants.TimeSpan, timeoutParam.Type?.TypeId); 2468Assert.Equal(AtsConstants.CancellationToken, ctParam.Type?.TypeId); 3021TypeId = AtsConstants.String, 3026TypeId = AtsConstants.Void, 3330TypeId = AtsConstants.Void, 3463TypeId = AtsConstants.Void, 3470TypeId = AtsConstants.Void, 3497TypeId = AtsConstants.String, 3506TypeId = AtsConstants.Number, 3514TypeId = AtsConstants.Void,
Aspire.Hosting.Native.CodeGeneration (50)
src\Aspire.Hosting.RemoteHost\AtsCapabilityScanner.cs (50)
98var typeId = AtsConstants.EnumTypeId(fullName); 1386AtsTypeCategory.Primitive => typeRef.TypeId != AtsConstants.CancellationToken && typeRef.TypeId != AtsConstants.Void, 1691: new AtsTypeRef { TypeId = AtsConstants.Any, Category = AtsTypeCategory.Primitive }; 1695TypeId = AtsConstants.DictTypeId(keyTypeRef.TypeId, valueTypeRef.TypeId), 1718propertyTypeRef = new AtsTypeRef { TypeId = AtsConstants.Any, Category = AtsTypeCategory.Primitive }; 2288returnTypeRef = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2292returnTypeRef = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2300?? new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive } 2301: new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2306?? new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive } 2334var voidTypeRef = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2452if (AtsConstants.IsPrimitiveType(type)) 2460return AtsConstants.Any; 2465return AtsConstants.DictTypeId(AtsConstants.String, AtsConstants.Any); 2470return AtsConstants.ListTypeId(AtsConstants.Any); 2476return AtsConstants.EnumTypeId(type.FullName ?? type.Name); 2498return AtsConstants.DictTypeId(keyTypeName, valueTypeName); 2514return AtsConstants.ListTypeId(elementTypeName); 2585return AtsConstants.String; 2589return AtsConstants.Char; 2593return AtsConstants.Boolean; 2602return AtsConstants.Number; 2608return AtsConstants.DateTime; 2612return AtsConstants.DateTimeOffset; 2616return AtsConstants.DateOnly; 2620return AtsConstants.TimeOnly; 2624return AtsConstants.TimeSpan; 2630return AtsConstants.Guid; 2634return AtsConstants.Uri; 2638return AtsConstants.CancellationToken; 2669TypeId = AtsConstants.Void, 2791return new AtsTypeRef { TypeId = AtsConstants.Any, ClrType = type, Category = AtsTypeCategory.Primitive }; 2798TypeId = AtsConstants.DictTypeId(AtsConstants.String, AtsConstants.Any), 2801KeyType = new AtsTypeRef { TypeId = AtsConstants.String, ClrType = typeof(string), Category = AtsTypeCategory.Primitive }, 2802ValueType = new AtsTypeRef { TypeId = AtsConstants.Any, ClrType = typeof(object), Category = AtsTypeCategory.Primitive }, 2811TypeId = AtsConstants.ListTypeId(AtsConstants.Any), 2814ElementType = new AtsTypeRef { TypeId = AtsConstants.Any, ClrType = typeof(object), Category = AtsTypeCategory.Primitive } 2826TypeId = AtsConstants.EnumTypeId(type.FullName ?? type.Name), 2849TypeId = AtsConstants.DictTypeId(keyTypeRef.TypeId, valueTypeRef.TypeId), 2872TypeId = AtsConstants.DictTypeId(keyTypeRef.TypeId, valueTypeRef.TypeId), 2894TypeId = AtsConstants.ListTypeId(elementTypeRef.TypeId), 2914TypeId = AtsConstants.ArrayTypeId(elementTypeRef.TypeId), 2959TypeId = AtsConstants.ArrayTypeId(elementTypeRef.TypeId),
Aspire.Hosting.RemoteHost (55)
Ats\AtsMarshaller.cs (2)
144if (typeRef.TypeId == AtsConstants.CancellationToken && value is CancellationToken cancellationToken) 150if (typeRef.TypeId == TypeSystem.AtsConstants.Any)
Ats\ExternalCapabilityRegistry.cs (2)
606.Where(parameter => parameter.Type?.TypeId == AtsConstants.CancellationToken) 760$"Integration capability '{capability.Id}' must declare returnType; use '{AtsConstants.Void}' for a void method.");
AtsCapabilityScanner.cs (50)
98var typeId = AtsConstants.EnumTypeId(fullName); 1386AtsTypeCategory.Primitive => typeRef.TypeId != AtsConstants.CancellationToken && typeRef.TypeId != AtsConstants.Void, 1691: new AtsTypeRef { TypeId = AtsConstants.Any, Category = AtsTypeCategory.Primitive }; 1695TypeId = AtsConstants.DictTypeId(keyTypeRef.TypeId, valueTypeRef.TypeId), 1718propertyTypeRef = new AtsTypeRef { TypeId = AtsConstants.Any, Category = AtsTypeCategory.Primitive }; 2288returnTypeRef = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2292returnTypeRef = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2300?? new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive } 2301: new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2306?? new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive } 2334var voidTypeRef = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2452if (AtsConstants.IsPrimitiveType(type)) 2460return AtsConstants.Any; 2465return AtsConstants.DictTypeId(AtsConstants.String, AtsConstants.Any); 2470return AtsConstants.ListTypeId(AtsConstants.Any); 2476return AtsConstants.EnumTypeId(type.FullName ?? type.Name); 2498return AtsConstants.DictTypeId(keyTypeName, valueTypeName); 2514return AtsConstants.ListTypeId(elementTypeName); 2585return AtsConstants.String; 2589return AtsConstants.Char; 2593return AtsConstants.Boolean; 2602return AtsConstants.Number; 2608return AtsConstants.DateTime; 2612return AtsConstants.DateTimeOffset; 2616return AtsConstants.DateOnly; 2620return AtsConstants.TimeOnly; 2624return AtsConstants.TimeSpan; 2630return AtsConstants.Guid; 2634return AtsConstants.Uri; 2638return AtsConstants.CancellationToken; 2669TypeId = AtsConstants.Void, 2791return new AtsTypeRef { TypeId = AtsConstants.Any, ClrType = type, Category = AtsTypeCategory.Primitive }; 2798TypeId = AtsConstants.DictTypeId(AtsConstants.String, AtsConstants.Any), 2801KeyType = new AtsTypeRef { TypeId = AtsConstants.String, ClrType = typeof(string), Category = AtsTypeCategory.Primitive }, 2802ValueType = new AtsTypeRef { TypeId = AtsConstants.Any, ClrType = typeof(object), Category = AtsTypeCategory.Primitive }, 2811TypeId = AtsConstants.ListTypeId(AtsConstants.Any), 2814ElementType = new AtsTypeRef { TypeId = AtsConstants.Any, ClrType = typeof(object), Category = AtsTypeCategory.Primitive } 2826TypeId = AtsConstants.EnumTypeId(type.FullName ?? type.Name), 2849TypeId = AtsConstants.DictTypeId(keyTypeRef.TypeId, valueTypeRef.TypeId), 2872TypeId = AtsConstants.DictTypeId(keyTypeRef.TypeId, valueTypeRef.TypeId), 2894TypeId = AtsConstants.ListTypeId(elementTypeRef.TypeId), 2914TypeId = AtsConstants.ArrayTypeId(elementTypeRef.TypeId), 2959TypeId = AtsConstants.ArrayTypeId(elementTypeRef.TypeId),
AtsContextFilter.cs (1)
344TypeId = AtsConstants.Void,
Aspire.Hosting.RemoteHost.Tests (34)
AtsCapabilityScannerTests.cs (9)
170[InlineData(typeof(double?[]), AtsConstants.Number)] 171[InlineData(typeof(bool?[]), AtsConstants.Boolean)] 194Assert.Contains(parameter.Type.UnionTypes!, type => type.TypeId == AtsConstants.String); 491Assert.Equal(AtsConstants.String, nameGetter.ReturnType.TypeId); 496Assert.Equal(AtsConstants.String, descriptionGetter.ReturnType.TypeId); 517Assert.Equal(AtsConstants.String, nullableString.Type.TypeId); 522Assert.Equal(AtsConstants.String, requiredString.Type.TypeId); 527Assert.Equal(AtsConstants.Number, nullableNumber.Type.TypeId); 532Assert.Equal(AtsConstants.Number, requiredNumber.Type.TypeId);
AtsContextFilterTests.cs (11)
136type => Assert.Equal(AtsConstants.EnumTypeId(typeof(TestMode).FullName!), type.TypeId)); 163Assert.Contains(filteredContext.EnumTypes, type => type.TypeId == AtsConstants.EnumTypeId(typeof(DistributedApplicationOperation).FullName!)); 164Assert.Contains(filteredContext.EnumTypes, type => type.TypeId == AtsConstants.EnumTypeId("Aspire.TypeSystem.ExportedValueMode")); 231Assert.Equal(AtsConstants.Void, filteredSupport.ReturnType.TypeId); 248TypeId = AtsConstants.EnumTypeId("Some.Foreign.Dependency.ForeignMode"), 256TypeId = AtsConstants.EnumTypeId("Some.Foreign.Dependency.ForeignCallbackMode"), 285Type = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }, 434TypeId = AtsConstants.EnumTypeId(typeof(TestMode).FullName!), 453TypeId = AtsConstants.EnumTypeId(typeof(TestMode).FullName!), 461TypeId = AtsConstants.EnumTypeId("Aspire.TypeSystem.ExportedValueMode"), 469TypeId = AtsConstants.EnumTypeId(typeof(DistributedApplicationOperation).FullName!),
AtsMarshallerTests.cs (10)
175new AtsTypeRef { TypeId = AtsConstants.String, ClrType = typeof(string), Category = AtsTypeCategory.Primitive }, 176new AtsTypeRef { TypeId = AtsConstants.Number, ClrType = typeof(int), Category = AtsTypeCategory.Primitive }, 177new AtsTypeRef { TypeId = AtsConstants.Boolean, ClrType = typeof(bool), Category = AtsTypeCategory.Primitive } 198new AtsTypeRef { TypeId = AtsConstants.String, ClrType = typeof(string), Category = AtsTypeCategory.Primitive }, 220new AtsTypeRef { TypeId = AtsConstants.String, ClrType = typeof(string), Category = AtsTypeCategory.Primitive }, 221new AtsTypeRef { TypeId = AtsConstants.Boolean, ClrType = typeof(bool), Category = AtsTypeCategory.Primitive } 293TypeId = AtsConstants.CancellationToken, 1423var conditionHandleId = registry.Register(condition, AtsConstants.ReferenceExpressionTypeId); 1465var conditionHandleId = registry.Register(condition, AtsConstants.ReferenceExpressionTypeId); 1507var conditionHandleId = registry.Register(condition, AtsConstants.ReferenceExpressionTypeId);
ExternalCapabilityRegistryTests.cs (3)
894ReturnType = new AtsTypeRef { TypeId = AtsConstants.Boolean, Category = AtsTypeCategory.Primitive } 920ReturnType = new AtsTypeRef { TypeId = AtsConstants.Boolean, Category = AtsTypeCategory.Primitive } 964Type = new AtsTypeRef { TypeId = AtsConstants.String, Category = AtsTypeCategory.Primitive },
HandleRegistryTests.cs (1)
350var typeId = AtsConstants.ReferenceExpressionTypeId;
Aspire.TypeSystem (2)
AtsCapabilityInfo.cs (1)
314/// Use <see cref="AtsConstants.Void"/> TypeId for void return types.
AtsContext.cs (1)
110if (AtsConstants.IsPrimitiveType(type))