8 writes to IsOptional
Aspire.Hosting.CodeGeneration.Go.Tests (2)
AtsGoCodeGeneratorTests.cs (1)
2738IsOptional = type.Name == "Integer"
GoApiExportTests.cs (1)
335new AtsDtoPropertyInfo { Name = "Optional", Type = new AtsTypeRef { TypeId = "string", Category = AtsTypeCategory.Primitive }, IsOptional = true }
Aspire.Hosting.Native.CodeGeneration (1)
src\Aspire.Hosting.RemoteHost\AtsCapabilityScanner.cs (1)
1211IsOptional = isOptional,
Aspire.Hosting.RemoteHost (1)
AtsCapabilityScanner.cs (1)
1211IsOptional = isOptional,
Aspire.Hosting.RemoteHost.Tests (4)
AtsContextFilterTests.cs (4)
280IsOptional = false 300IsOptional = true 438IsOptional = false 491IsOptional = false
26 references to IsOptional
Aspire.Hosting.CodeGeneration.Go (5)
AtsGoCodeGenerator.ApiProjection.cs (1)
503dtoType?.Properties.Any(property => ToPascalCase(property.Name) == member.Name && property.IsOptional) == true
AtsGoCodeGenerator.cs (4)
1100: MapDtoPropertyTypeToGo(property.Type, property.IsOptional); 1125var propertyType = MapDtoPropertyTypeToGo(property.Type, property.IsOptional); 2209IsOptional = property.IsOptional, 2491var fieldType = MapDtoPropertyTypeToGo(property.Type, property.IsOptional);
Aspire.Hosting.CodeGeneration.Java (2)
AtsJavaCodeGenerator.cs (2)
778WriteLine($" value.set{methodName}({RenderJavaDtoPropertyTransportValueConversion(property.Type, transportValueName, property.IsOptional)});"); 1991: MapDtoPropertyTypeToJava(property.Type, property.IsOptional);
Aspire.Hosting.CodeGeneration.Rust (4)
AtsRustCodeGenerator.cs (4)
223var propertyType = MapTypeRefToRustForDto(property.Type, property.IsOptional); 226if (property.IsOptional) 246if (property.IsOptional) 359return dto.Properties.All(property => CanDeriveDefault(property.Type, property.IsOptional, dtoTypesById, visitedTypeIds));
Aspire.Hosting.CodeGeneration.TypeScript (1)
AtsTypeScriptCodeGenerator.cs (1)
1563IsOptional = callbackProperty.IsOptional,
Aspire.Hosting.CodeGeneration.TypeScript.Tests (2)
AtsTypeScriptCodeGeneratorTests.cs (2)
1965Assert.True(createProcessSpec.IsOptional); 2621Assert.All(dto.Properties, property => Assert.True(property.IsOptional));
Aspire.Hosting.RemoteHost (1)
CodeGeneration\CodeGenerationService.cs (1)
182IsOptional = p.IsOptional,
Aspire.Hosting.RemoteHost.Tests (11)
AtsCapabilityScannerTests.cs (11)
431Assert.True(commandOptionsProperty.IsOptional); 438Assert.True(prepareRequestProperty.IsOptional); 519Assert.False(nullableString.IsOptional); 524Assert.False(requiredString.IsOptional); 529Assert.True(nullableNumber.IsOptional); 534Assert.False(requiredNumber.IsOptional); 795Assert.True(Assert.Single(dto.Properties, p => p.Name == nameof(InitPropertiesDto.DisplayName)).IsOptional); 796Assert.True(Assert.Single(dto.Properties, p => p.Name == nameof(InitPropertiesDto.Items)).IsOptional); 797Assert.True(Assert.Single(dto.Properties, p => p.Name == nameof(InitPropertiesDto.Metadata)).IsOptional); 798Assert.False(Assert.Single(dto.Properties, p => p.Name == nameof(InitPropertiesDto.RequiredDisplayName)).IsOptional); 799Assert.False(Assert.Single(dto.Properties, p => p.Name == nameof(InitPropertiesDto.RequiredItems)).IsOptional);