133 references to Primitive
Aspire.Hosting.CodeGeneration.Go (7)
AtsGoCodeGenerator.cs (7)
1259AtsTypeCategory.Primitive => RenderGoJsonValue(value), 1275var valueType = typeRef.Category == AtsTypeCategory.Primitive 2525return property.Type.Category is AtsTypeCategory.Primitive or AtsTypeCategory.Enum 2535AtsTypeCategory.Primitive => type.TypeId is not (AtsConstants.Any or AtsConstants.ReferenceExpressionTypeId), 2609return parameter.Type is { Category: AtsTypeCategory.Primitive or AtsTypeCategory.Enum } 3075AtsTypeCategory.Primitive => MapPrimitiveType(typeRef), 3139&& typeRef.Category is AtsTypeCategory.Primitive or AtsTypeCategory.Enum
Aspire.Hosting.CodeGeneration.Go.Tests (10)
AtsGoCodeGeneratorTests.cs (4)
2640Category = AtsTypeCategory.Primitive 2646Category = AtsTypeCategory.Primitive 2648var voidType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2736Category = AtsTypeCategory.Primitive
AtsGoDerivedBuilderTests.cs (2)
497private static readonly AtsTypeRef s_string = new() { TypeId = AtsConstants.String, Category = AtsTypeCategory.Primitive }; 658CallbackReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }
GoApiExportTests.cs (2)
334new AtsDtoPropertyInfo { Name = "Required", Type = new AtsTypeRef { TypeId = "string", Category = AtsTypeCategory.Primitive } }, 335new AtsDtoPropertyInfo { Name = "Optional", Type = new AtsTypeRef { TypeId = "string", Category = AtsTypeCategory.Primitive }, IsOptional = true }
GoDocCommentTests.cs (1)
565private static AtsTypeRef Primitive(string typeId) => new() { TypeId = typeId, Category = AtsTypeCategory.Primitive };
GoGeneratorEscapingTests.cs (1)
223private static AtsTypeRef Primitive(string typeId) => new() { TypeId = typeId, Category = AtsTypeCategory.Primitive };
Aspire.Hosting.CodeGeneration.Java (3)
AtsJavaCodeGenerator.cs (3)
879AtsTypeCategory.Primitive => value.ToRelaxedJsonString(), 2063AtsTypeCategory.Primitive => RenderJavaPrimitiveTransportValueConversion(typeRef.TypeId, valueExpression, allowNull), 2576AtsTypeCategory.Primitive => MapPrimitiveType(typeRef.TypeId, isOptional || useBoxedTypes),
Aspire.Hosting.CodeGeneration.Java.Tests (22)
AtsJavaCodeGeneratorTests.cs (22)
719var numberType = new AtsTypeRef { TypeId = AtsConstants.Number, Category = AtsTypeCategory.Primitive }; 720var booleanType = new AtsTypeRef { TypeId = AtsConstants.Boolean, Category = AtsTypeCategory.Primitive }; 2950var stringType = new AtsTypeRef { TypeId = "string", Category = AtsTypeCategory.Primitive }; 2998var stringType = new AtsTypeRef { TypeId = AtsConstants.String, Category = AtsTypeCategory.Primitive }; 3007CallbackReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive } 3014ReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }, 3046ReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }, 3082Category = AtsTypeCategory.Primitive, 3117new AtsTypeRef { TypeId = AtsConstants.Boolean, Category = AtsTypeCategory.Primitive, IsNullable = true }), 3121new AtsTypeRef { TypeId = AtsConstants.Number, Category = AtsTypeCategory.Primitive, IsNullable = true }), 3251Category = AtsTypeCategory.Primitive, 3257Category = AtsTypeCategory.Primitive, 3288CallbackReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive } 3295ReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }, 3553Type = new AtsTypeRef { TypeId = AtsConstants.String, Category = AtsTypeCategory.Primitive } 3575Category = AtsTypeCategory.Primitive 3639CallbackReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive } 3646ReturnType = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }, 3668Type = new AtsTypeRef { TypeId = AtsConstants.String, Category = AtsTypeCategory.Primitive } 3914new AtsTypeRef { TypeId = "string", Category = AtsTypeCategory.Primitive }); 3948KeyType = new AtsTypeRef { TypeId = "string", Category = AtsTypeCategory.Primitive }, 3949ValueType = new AtsTypeRef { TypeId = "string", Category = AtsTypeCategory.Primitive }
Aspire.Hosting.CodeGeneration.Python (4)
AtsPythonCodeGenerator.cs (4)
222AtsTypeCategory.Primitive => MapPrimitiveType(typeRef.TypeId), 246&& typeRef.Category is AtsTypeCategory.Primitive or AtsTypeCategory.Enum 533if (typeRef.Category == AtsTypeCategory.Primitive && typeRef.TypeId == AtsConstants.Void) 1026if (!topLevel || typeRef.Category is AtsTypeCategory.Primitive)
Aspire.Hosting.CodeGeneration.Python.Tests (9)
AtsPythonCodeGeneratorTests.cs (9)
886Category = AtsTypeCategory.Primitive 942Category = AtsTypeCategory.Primitive 1016Category = AtsTypeCategory.Primitive 1068Category = AtsTypeCategory.Primitive, 1076Category = AtsTypeCategory.Primitive 1115Category = AtsTypeCategory.Primitive, 1125Category = AtsTypeCategory.Primitive 1161Category = AtsTypeCategory.Primitive 1167Category = AtsTypeCategory.Primitive
Aspire.Hosting.CodeGeneration.Rust (6)
AtsRustCodeGenerator.cs (6)
386AtsTypeCategory.Primitive => true, 914AtsTypeCategory.Primitive => MapPrimitiveType(typeRef.TypeId), 952AtsTypeCategory.Primitive => MapPrimitiveType(typeRef.TypeId), 992AtsTypeCategory.Primitive => MapPrimitiveType(typeRef.TypeId), 1037if (typeRef.Category == AtsTypeCategory.Primitive) 1063&& typeRef.Category is AtsTypeCategory.Primitive or AtsTypeCategory.Enum
Aspire.Hosting.CodeGeneration.TypeScript (4)
TypeScriptApiProjector.cs (4)
759return exportedValue.Type.Category is AtsTypeCategory.Primitive 1691AtsTypeCategory.Primitive => MapPrimitiveType(typeRef.TypeId), 1710if (typeRef.IsNullable != true || typeRef.Category is not (AtsTypeCategory.Primitive or AtsTypeCategory.Enum)) 1739elementType is { IsNullable: true, Category: AtsTypeCategory.Primitive or AtsTypeCategory.Enum };
Aspire.Hosting.CodeGeneration.TypeScript.Tests (16)
AtsTypeScriptCodeGeneratorTests.cs (16)
288Category = AtsTypeCategory.Primitive 970Category = AtsTypeCategory.Primitive, 1043Category = AtsTypeCategory.Primitive 1070Category = AtsTypeCategory.Primitive, 1077KeyType = new AtsTypeRef { TypeId = AtsConstants.String, Category = AtsTypeCategory.Primitive }, 2117Category = AtsTypeCategory.Primitive 2142Category = AtsTypeCategory.Primitive 2519Assert.Equal(AtsTypeCategory.Primitive, ctParam.Type.Category); 3135Category = AtsTypeCategory.Primitive 3140Category = AtsTypeCategory.Primitive 3444Category = AtsTypeCategory.Primitive 3577Category = AtsTypeCategory.Primitive 3584Category = AtsTypeCategory.Primitive 3611Category = AtsTypeCategory.Primitive 3620Category = AtsTypeCategory.Primitive 3628Category = AtsTypeCategory.Primitive
Aspire.Hosting.Native.CodeGeneration (17)
NativeCSharpProjection.cs (1)
242AtsTypeCategory.Primitive => type.TypeId switch
NativeProviderTypeScriptProjection.cs (1)
93AtsTypeCategory.Primitive => id switch
src\Aspire.Hosting.RemoteHost\AtsCapabilityScanner.cs (15)
1399AtsTypeCategory.Primitive => typeRef.TypeId != AtsConstants.CancellationToken && typeRef.TypeId != AtsConstants.Void, 1704: new AtsTypeRef { TypeId = AtsConstants.Any, Category = AtsTypeCategory.Primitive }; 1731propertyTypeRef = new AtsTypeRef { TypeId = AtsConstants.Any, Category = AtsTypeCategory.Primitive }; 2301returnTypeRef = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2305returnTypeRef = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2313?? new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive } 2314: new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2319?? new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive } 2347var voidTypeRef = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2683Category = AtsTypeCategory.Primitive 2798return new AtsTypeRef { TypeId = primitiveTypeId, ClrType = type, Category = AtsTypeCategory.Primitive }; 2804return new AtsTypeRef { TypeId = AtsConstants.Any, ClrType = type, Category = AtsTypeCategory.Primitive }; 2814KeyType = new AtsTypeRef { TypeId = AtsConstants.String, ClrType = typeof(string), Category = AtsTypeCategory.Primitive }, 2815ValueType = new AtsTypeRef { TypeId = AtsConstants.Any, ClrType = typeof(object), Category = AtsTypeCategory.Primitive }, 2827ElementType = new AtsTypeRef { TypeId = AtsConstants.Any, ClrType = typeof(object), Category = AtsTypeCategory.Primitive }
Aspire.Hosting.RemoteHost (19)
Ats\AtsMarshaller.cs (3)
158AtsTypeCategory.Primitive => SerializePrimitive(value), 216AtsTypeCategory.Primitive => SerializePrimitive(value), 455AtsTypeCategory.Primitive => SerializePrimitive(value),
AtsCapabilityScanner.cs (15)
1399AtsTypeCategory.Primitive => typeRef.TypeId != AtsConstants.CancellationToken && typeRef.TypeId != AtsConstants.Void, 1704: new AtsTypeRef { TypeId = AtsConstants.Any, Category = AtsTypeCategory.Primitive }; 1731propertyTypeRef = new AtsTypeRef { TypeId = AtsConstants.Any, Category = AtsTypeCategory.Primitive }; 2301returnTypeRef = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2305returnTypeRef = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2313?? new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive } 2314: new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2319?? new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive } 2347var voidTypeRef = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }; 2683Category = AtsTypeCategory.Primitive 2798return new AtsTypeRef { TypeId = primitiveTypeId, ClrType = type, Category = AtsTypeCategory.Primitive }; 2804return new AtsTypeRef { TypeId = AtsConstants.Any, ClrType = type, Category = AtsTypeCategory.Primitive }; 2814KeyType = new AtsTypeRef { TypeId = AtsConstants.String, ClrType = typeof(string), Category = AtsTypeCategory.Primitive }, 2815ValueType = new AtsTypeRef { TypeId = AtsConstants.Any, ClrType = typeof(object), Category = AtsTypeCategory.Primitive }, 2827ElementType = new AtsTypeRef { TypeId = AtsConstants.Any, ClrType = typeof(object), Category = AtsTypeCategory.Primitive }
AtsContextFilter.cs (1)
345Category = AtsTypeCategory.Primitive
Aspire.Hosting.RemoteHost.Tests (13)
AtsContextFilterTests.cs (3)
285Type = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }, 580Category = AtsTypeCategory.Primitive 606Category = AtsTypeCategory.Primitive
AtsMarshallerTests.cs (7)
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 } 294Category = AtsTypeCategory.Primitive
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 },
Aspire.TypeSystem (3)
AtsConstants.cs (2)
361return AtsTypeCategory.Primitive; 448return AtsTypeCategory.Primitive;
AtsContext.cs (1)
112return AtsTypeCategory.Primitive;