37 references to Union
Aspire.Hosting.CodeGeneration.Go (3)
AtsGoCodeGenerator.cs (3)
2284if (p.Type?.Category == AtsTypeCategory.Union) 2623AtsTypeCategory.Union => "any", 2651AtsTypeCategory.Union => "any",
Aspire.Hosting.CodeGeneration.Go.Tests (2)
AtsGoDerivedBuilderTests.cs (1)
643Category = AtsTypeCategory.Union,
GoGeneratorEscapingTests.cs (1)
96var unionType = new AtsTypeRef { TypeId = "Tests/Union", Category = AtsTypeCategory.Union, UnionTypes = [stringType, numberType] };
Aspire.Hosting.CodeGeneration.Java (4)
AtsJavaCodeGenerator.cs (4)
2070AtsTypeCategory.Union => $"AspireUnion.of({valueExpression})", 2588AtsTypeCategory.Union => "AspireUnion", 2611AtsTypeCategory.Union => "AspireUnion", 2680private static bool IsUnionType(AtsTypeRef? typeRef) => typeRef?.Category == AtsTypeCategory.Union;
Aspire.Hosting.CodeGeneration.Python (3)
AtsPythonCodeGenerator.cs (3)
232AtsTypeCategory.Union => MapUnionTypeToPython(typeRef), 526if (typeRef.Category == AtsTypeCategory.Union) 607AtsTypeCategory.Union => MapDtoUnionTypeToPython(typeRef),
Aspire.Hosting.CodeGeneration.Python.Tests (2)
AtsPythonCodeGeneratorTests.cs (2)
1064Category = AtsTypeCategory.Union, 1070Category = AtsTypeCategory.Union,
Aspire.Hosting.CodeGeneration.Rust (4)
AtsRustCodeGenerator.cs (4)
395AtsTypeCategory.Union => true, 926AtsTypeCategory.Union => "Value", 970AtsTypeCategory.Union => "Value", 997AtsTypeCategory.Union or AtsTypeCategory.Unknown => "Value",
Aspire.Hosting.CodeGeneration.TypeScript (5)
TypeScriptApiProjector.cs (5)
1701AtsTypeCategory.Union => MapUnionTypeToTypeScript(typeRef), 1731AtsTypeCategory.Union => MapDtoUnionTypeToTypeScript(typeRef), 1738var requiresGrouping = elementType?.Category == AtsTypeCategory.Union || 1859if (typeRef?.Category == AtsTypeCategory.Union) 2551if (typeRef.Category == AtsTypeCategory.Union && typeRef.UnionTypes is { Count: > 0 })
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
AtsTypeScriptCodeGeneratorTests.cs (1)
1009Category = AtsTypeCategory.Union,
Aspire.Hosting.Native.CodeGeneration (5)
NativeCSharpProjection.cs (2)
160var value = parameter.Type!.Category == AtsTypeCategory.Union 240AtsTypeCategory.Union => "object",
Program.cs (1)
439if (parameter.Type is { Category: AtsTypeCategory.Union, UnionTypes: { } members } &&
src\Aspire.Hosting.RemoteHost\AtsCapabilityScanner.cs (2)
1393AtsTypeCategory.Union => typeRef.UnionTypes is not null 3419Category = AtsTypeCategory.Union,
Aspire.Hosting.RemoteHost (3)
Ats\AtsMarshaller.cs (1)
164AtsTypeCategory.Union => MarshalUnion(value, typeRef),
AtsCapabilityScanner.cs (2)
1393AtsTypeCategory.Union => typeRef.UnionTypes is not null 3419Category = AtsTypeCategory.Union,
Aspire.Hosting.RemoteHost.Tests (5)
AtsCapabilityScannerTests.cs (2)
192Assert.Equal(AtsTypeCategory.Union, parameter.Type?.Category); 336Assert.Equal(AtsTypeCategory.Union, resourceParameter.Type?.Category);
AtsMarshallerTests.cs (3)
172Category = AtsTypeCategory.Union, 195Category = AtsTypeCategory.Union, 217Category = AtsTypeCategory.Union,