32 writes to Type
Aspire.Hosting.CodeGeneration.Go.Tests (13)
AtsGoCodeGeneratorTests.cs (2)
1849Type = nullableNumbers 2732Type = new AtsTypeRef
AtsGoDerivedBuilderTests.cs (2)
549new AtsDtoPropertyInfo { Name = "Pool", Type = s_pool }, 550new AtsDtoPropertyInfo { Name = "Label", Type = s_string }
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 (4)
519new AtsDtoPropertyInfo { Name = "DisplayName", Type = stringType, Documentation = new AtsDocumentationInfo { Summary = "Gets or sets the display name." } }, 520new AtsDtoPropertyInfo { Name = "Enabled", Type = boolType, Documentation = new AtsDocumentationInfo { Summary = "Gets or sets a value indicating whether the resource is enabled." } }, 521new AtsDtoPropertyInfo { Name = "Port", Type = Primitive(AtsConstants.Number), Description = "The port of the resource." }, 522new AtsDtoPropertyInfo { Name = "Undocumented", Type = stringType }
GoGeneratorEscapingTests.cs (3)
176new AtsDtoPropertyInfo { Name = "Bad\"Name", Type = stringType, Documentation = new AtsDocumentationInfo { Summary = InjectedText } }, 177new AtsDtoPropertyInfo { Name = "Back\\slash", Type = numberType }, 178new AtsDtoPropertyInfo { Name = "cal\"lback", Type = callbackType, IsCallback = true, CallbackParameters = callbackParameters, CallbackReturnType = voidType }
Aspire.Hosting.CodeGeneration.Java.Tests (10)
AtsJavaCodeGeneratorTests.cs (10)
733new AtsDtoPropertyInfo { Name = "MinLength", Type = numberType }, 734new AtsDtoPropertyInfo { Name = "Lower", Type = booleanType }, 735new AtsDtoPropertyInfo { Name = "MinLower", Type = numberType }, 736new AtsDtoPropertyInfo { Name = "MinUpper", Type = numberType } 3319new AtsDtoPropertyInfo { Name = "Numbers", Type = numberArray }, 3320new AtsDtoPropertyInfo { Name = "Flags", Type = booleanMatrix } 3553Type = new AtsTypeRef { TypeId = AtsConstants.String, Category = AtsTypeCategory.Primitive } 3566Type = new AtsTypeRef { TypeId = "callback", Category = AtsTypeCategory.Callback }, 3668Type = new AtsTypeRef { TypeId = AtsConstants.String, Category = AtsTypeCategory.Primitive } 3935Type = propertyType
Aspire.Hosting.CodeGeneration.Python.Tests (1)
AtsPythonCodeGeneratorTests.cs (1)
390Type = new AtsTypeRef
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
AtsRustCodeGeneratorTests.cs (1)
165Type = nullableNumbers
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
AtsTypeScriptCodeGeneratorTests.cs (1)
995Type = nullableNumberArrayType
Aspire.Hosting.Native.CodeGeneration (1)
src\Aspire.Hosting.RemoteHost\AtsCapabilityScanner.cs (1)
1207Type = propTypeRef,
Aspire.Hosting.RemoteHost (1)
AtsCapabilityScanner.cs (1)
1207Type = propTypeRef,
Aspire.Hosting.RemoteHost.Tests (4)
AtsContextFilterTests.cs (4)
274Type = new AtsTypeRef 285Type = new AtsTypeRef { TypeId = AtsConstants.Void, Category = AtsTypeCategory.Primitive }, 432Type = new AtsTypeRef 485Type = new AtsTypeRef
45 references to Type
Aspire.Hosting.CodeGeneration.Go (12)
AtsGoCodeGenerator.ApiProjection.cs (2)
334.Where(property => CanUseDirectOptionType(property.Type)) 338.Where(property => !CanUseDirectOptionType(property.Type))
AtsGoCodeGenerator.cs (10)
161CollectRequiredType(property.Type, requiredTypeIds); 183CollectRequiredType(property.Type, requiredTypeIds); 1100: MapDtoPropertyTypeToGo(property.Type, property.IsOptional); 1125var propertyType = MapDtoPropertyTypeToGo(property.Type, property.IsOptional); 1307members.Add($"{ToPascalCase(property.Name)}: {RenderGoExportedValue(propertyValue, property.Type, dtoTypesById)}"); 2208Type = property.Type, 2491var fieldType = MapDtoPropertyTypeToGo(property.Type, property.IsOptional); 2494if (CanUseDirectOptionType(property.Type)) 2524var type = MapDtoPropertyTypeToGo(property.Type, isOptional: false); 2525return property.Type.Category is AtsTypeCategory.Primitive or AtsTypeCategory.Enum
Aspire.Hosting.CodeGeneration.Java (3)
AtsJavaCodeGenerator.cs (3)
778WriteLine($" value.set{methodName}({RenderJavaDtoPropertyTransportValueConversion(property.Type, transportValueName, property.IsOptional)});"); 913sb.Append(RenderJavaExportedValue(propertyValue, property.Type, dtoTypesById)); 1991: MapDtoPropertyTypeToJava(property.Type, property.IsOptional);
Aspire.Hosting.CodeGeneration.Python (2)
AtsPythonCodeGenerator.cs (2)
941: MapDtoPropertyTypeToPython(prop.Type); 1047members.Add($"{AtsJsonCodeWriter.ToRelaxedJsonString(JsonNamingPolicy.CamelCase.ConvertName(property.Name))}: {RenderPythonExportedValue(propertyValue, property.Type, dtoTypesById, topLevel: false)}");
Aspire.Hosting.CodeGeneration.Rust (2)
AtsRustCodeGenerator.cs (2)
223var propertyType = MapTypeRefToRustForDto(property.Type, property.IsOptional); 359return dto.Properties.All(property => CanDeriveDefault(property.Type, property.IsOptional, dtoTypesById, visitedTypeIds));
Aspire.Hosting.CodeGeneration.TypeScript (10)
AtsTypeScriptCodeGenerator.cs (8)
394.Where(p => p.IsCallback || RequiresDtoCallbackMarshalling(p.Type)) 416return dtoType.Properties.Any(p => p.IsCallback || RequiresDtoCallbackMarshalling(p.Type, visitedDtoTypeIds)); 705: _projector.MapDtoPropertyTypeToTypeScript(prop.Type); 1529if (!TryGetDtoCallbackMarshallingProperties(dtoProperty.Type, out var nestedMarshallingProperties)) 1538if (!visitedDtoTypeIds.Add(dtoProperty.Type.TypeId)) 1554visitedDtoTypeIds.Remove(dtoProperty.Type.TypeId); 1562Type = callbackProperty.Type, 1564IsNullable = callbackProperty.Type.IsNullable == true,
TypeScriptApiProjector.cs (2)
791members.Add($"{ToCamelCase(property.Name)}: {RenderTypeScriptExportedValue(propertyValue, property.Type)}"); 1403: MapDtoPropertyTypeToTypeScript(property.Type);
Aspire.Hosting.Native.CodeGeneration (4)
NativeCSharpProjection.cs (2)
42if (property.IsCallback || ContainsHandle(property.Type)) 48$" public required {TypeName(property.Type)} {property.Name} {{ get; init; }}");
src\Aspire.Hosting.RemoteHost\AtsCapabilityScanner.cs (2)
628CollectEnumClrTypes(prop.Type, enumTypes); 744ResolveTypeRef(prop.Type, validTypes);
Aspire.Hosting.RemoteHost (4)
AtsCapabilityScanner.cs (2)
628CollectEnumClrTypes(prop.Type, enumTypes); 744ResolveTypeRef(prop.Type, validTypes);
AtsContextFilter.cs (1)
485CollectReferencedType(property.Type, handleTypesById, dtoTypesById, enumTypesById, includedHandleTypeIds, includedDtoTypeIds, includedEnumTypeIds);
CodeGeneration\CodeGenerationService.cs (1)
181Type = MapTypeRef(p.Type),
Aspire.Hosting.RemoteHost.Tests (8)
AtsCapabilityScannerTests.cs (8)
517Assert.Equal(AtsConstants.String, nullableString.Type.TypeId); 518Assert.True(nullableString.Type.IsNullable); 522Assert.Equal(AtsConstants.String, requiredString.Type.TypeId); 523Assert.NotEqual(true, requiredString.Type.IsNullable); 527Assert.Equal(AtsConstants.Number, nullableNumber.Type.TypeId); 528Assert.True(nullableNumber.Type.IsNullable); 532Assert.Equal(AtsConstants.Number, requiredNumber.Type.TypeId); 533Assert.NotEqual(true, requiredNumber.Type.IsNullable);