35 instantiations of AtsDtoTypeInfo
Aspire.Hosting.CodeGeneration.Go (1)
AtsGoCodeGenerator.cs (1)
202: new AtsDtoTypeInfo
Aspire.Hosting.CodeGeneration.Go.Tests (7)
AtsGoCodeGeneratorTests.cs (3)
1840new AtsDtoTypeInfo 2679new AtsDtoTypeInfo 2725new AtsDtoTypeInfo
AtsGoDerivedBuilderTests.cs (1)
543new AtsDtoTypeInfo
GoApiExportTests.cs (1)
328new AtsDtoTypeInfo
GoDocCommentTests.cs (1)
512new AtsDtoTypeInfo
GoGeneratorEscapingTests.cs (1)
170new AtsDtoTypeInfo
Aspire.Hosting.CodeGeneration.Java.Tests (6)
AtsJavaCodeGeneratorTests.cs (6)
727new AtsDtoTypeInfo 3313new AtsDtoTypeInfo 3544new AtsDtoTypeInfo 3557new AtsDtoTypeInfo 3659new AtsDtoTypeInfo 3926new AtsDtoTypeInfo
Aspire.Hosting.CodeGeneration.Python.Tests (1)
AtsPythonCodeGeneratorTests.cs (1)
381new AtsDtoTypeInfo
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
AtsRustCodeGeneratorTests.cs (1)
156new AtsDtoTypeInfo
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
AtsTypeScriptCodeGeneratorTests.cs (1)
986var nullableNumberArrayDto = new AtsDtoTypeInfo
Aspire.Hosting.Native.CodeGeneration (1)
src\Aspire.Hosting.RemoteHost\AtsCapabilityScanner.cs (1)
1218return new AtsDtoTypeInfo
Aspire.Hosting.RemoteHost (1)
AtsCapabilityScanner.cs (1)
1218return new AtsDtoTypeInfo
Aspire.Hosting.RemoteHost.Tests (16)
AtsContextFilterTests.cs (4)
264var ownedDtoType = new AtsDtoTypeInfo 422var selectedDtoType = new AtsDtoTypeInfo 443var referencedCoreDtoType = new AtsDtoTypeInfo 475var exportedValueOnlyDtoType = new AtsDtoTypeInfo
AtsMarshallerTests.cs (11)
23new AtsDtoTypeInfo { TypeId = "test/TestDto", Name = "TestDto", ClrType = typeof(TestDto), Properties = [] }, 24new AtsDtoTypeInfo { TypeId = "test/TestDtoWithEnum", Name = "TestDtoWithEnum", ClrType = typeof(TestDtoWithEnum), Properties = [] }, 25new AtsDtoTypeInfo { TypeId = "test/TestDto", Name = "TestDto", ClrType = typeof(TestDto), Properties = [] }, 26new AtsDtoTypeInfo { TypeId = "test/SelfReferencingDto", Name = "SelfReferencingDto", ClrType = typeof(SelfReferencingDto), Properties = [] }, 27new AtsDtoTypeInfo { TypeId = "test/ParentDto", Name = "ParentDto", ClrType = typeof(ParentDto), Properties = [] }, 28new AtsDtoTypeInfo { TypeId = "test/ChildDto", Name = "ChildDto", ClrType = typeof(ChildDto), Properties = [] }, 29new AtsDtoTypeInfo { TypeId = "test/DtoWithJsonPropertyName", Name = "DtoWithJsonPropertyName", ClrType = typeof(DtoWithJsonPropertyName), Properties = [] }, 30new AtsDtoTypeInfo { TypeId = "test/DtoWithJsonIgnore", Name = "DtoWithJsonIgnore", ClrType = typeof(DtoWithJsonIgnore), Properties = [] }, 31new AtsDtoTypeInfo { TypeId = "test/DtoWithReadOnlyProperty", Name = "DtoWithReadOnlyProperty", ClrType = typeof(DtoWithReadOnlyProperty), Properties = [] }, 32new AtsDtoTypeInfo { TypeId = "test/DtoWithInitListProperties", Name = "DtoWithInitListProperties", ClrType = typeof(DtoWithInitListProperties), Properties = [] }, 33new AtsDtoTypeInfo { TypeId = "test/DtoWithTimeSpans", Name = "DtoWithTimeSpans", ClrType = typeof(DtoWithTimeSpans), Properties = [] },
CallbackProxyTests.cs (1)
475new() { TypeId = "test/TestCallbackDto", Name = "TestCallbackDto", ClrType = typeof(TestCallbackDto), Properties = [] }
106 references to AtsDtoTypeInfo
Aspire.Hosting.CodeGeneration.Go (21)
AtsGoCodeGenerator.ApiProjection.cs (5)
302var dtosByName = new Dictionary<string, AtsDtoTypeInfo>(StringComparer.Ordinal); 303foreach (var dtoType in context.DtoTypes) 332var createBuilderOptions = context.DtoTypes.FirstOrDefault(dto => dto.Name == "CreateBuilderOptions"); 355else if (dtosByName.TryGetValue(type.Name, out var dtoType)) 470AtsDtoTypeInfo? dtoType,
AtsGoCodeGenerator.cs (13)
157foreach (var dto in context.DtoTypes.Where(dto => !AtsTypeSystemCompatibility.IsObsolete(dto))) 175foreach (var dto in context.DtoTypes.Where(dto => requiredDtoIds.Contains(dto.TypeId))) 397foreach (var dto in context.DtoTypes) 909foreach (var dto in context.DtoTypes) 1055private void GenerateDtoTypes(IReadOnlyList<AtsDtoTypeInfo> dtoTypes) 1067foreach (var dto in dtoTypes) 1143IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById) 1216IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById, 1250IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById) 1261AtsTypeCategory.Dto when value is JsonObject obj && dtoTypesById.TryGetValue(typeRef.TypeId, out var dtoInfo) 1291AtsDtoTypeInfo dtoInfo, 1292IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById) 3033foreach (var dto in context.DtoTypes)
src\Shared\CodeGeneration\AtsTypeSystemCompatibility.cs (3)
20typeof(AtsDtoTypeInfo).GetProperty("IsObsolete", BindingFlags.Instance | BindingFlags.Public); 40public static bool IsObsolete(AtsDtoTypeInfo type) => 43public static bool IsObsolete(AtsDtoTypeInfo _, AtsDtoPropertyInfo property)
Aspire.Hosting.CodeGeneration.Go.Tests (1)
AtsGoCodeGeneratorTests.cs (1)
2758var obsoleteDto = Assert.Single(context.DtoTypes, type => type.ClrType == typeof(GoObsoleteDto));
Aspire.Hosting.CodeGeneration.Java (9)
AtsJavaCodeGenerator.cs (9)
598foreach (var dto in dtoTypes) 718private void GenerateDtoTypes(IReadOnlyList<AtsDtoTypeInfo> dtoTypes) 730foreach (var dto in dtoTypes) 809IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById) 836IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById, 870IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById) 881AtsTypeCategory.Dto when value is JsonObject obj && dtoTypesById.TryGetValue(typeRef.TypeId, out var dtoInfo) 895AtsDtoTypeInfo dtoInfo, 896IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById)
Aspire.Hosting.CodeGeneration.Python (8)
AtsPythonCodeGenerator.cs (8)
913private void GenerateDtoClasses(IReadOnlyList<AtsDtoTypeInfo> dtoTypes) 921foreach (var dtoType in dtoTypes.OrderBy(d => d.Name)) 957IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById) 978IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById) 1003IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById, 1016AtsTypeCategory.Dto when value is JsonObject obj && dtoTypesById.TryGetValue(typeRef.TypeId, out var dtoInfo) 1036AtsDtoTypeInfo dtoInfo, 1037IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById)
Aspire.Hosting.CodeGeneration.Rust (7)
AtsRustCodeGenerator.cs (7)
94foreach (var dto in dtoTypes) 190private void GenerateDtoTypes(IReadOnlyList<AtsDtoTypeInfo> dtoTypes) 204foreach (var dto in dtoTypes) 348AtsDtoTypeInfo dto, 349IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById, 370IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById, 389AtsTypeCategory.Dto => !dtoTypesById.TryGetValue(typeRef.TypeId, out var dto)
Aspire.Hosting.CodeGeneration.TypeScript (14)
AtsTypeScriptCodeGenerator.cs (4)
388!_projector.DtoTypesById.TryGetValue(typeRef.TypeId, out var dtoType)) 403!_projector.DtoTypesById.TryGetValue(typeRef.TypeId, out var dtoType)) 678private void GenerateDtoInterfaces(IReadOnlyList<AtsDtoTypeInfo> dtoTypes) 694foreach (var dto in generatedDtoTypes.OrderBy(d => d.Name))
src\Shared\CodeGeneration\AtsTypeSystemCompatibility.cs (3)
20typeof(AtsDtoTypeInfo).GetProperty("IsObsolete", BindingFlags.Instance | BindingFlags.Public); 40public static bool IsObsolete(AtsDtoTypeInfo type) => 43public static bool IsObsolete(AtsDtoTypeInfo _, AtsDtoPropertyInfo property)
TypeScriptApiProjector.cs (7)
123internal Dictionary<string, AtsDtoTypeInfo> DtoTypesById => _dtoTypesById; 187foreach (var dtoType in dtoTypes) 513foreach (var dtoType in _resolved.Context.DtoTypes 773AtsTypeCategory.Dto when value is JsonObject obj && _dtoTypesById.TryGetValue(typeRef.TypeId, out var dtoInfo) 783private string RenderTypeScriptDtoValue(JsonObject value, AtsDtoTypeInfo dtoInfo) 1392private (TypeScriptApiItem Item, TypeScriptApiDeclaration Declaration) ProjectDto(AtsDtoTypeInfo dtoType) 1610private readonly Dictionary<string, AtsDtoTypeInfo> _dtoTypesById = new(StringComparer.Ordinal);
Aspire.Hosting.CodeGeneration.TypeScript.Tests (6)
AtsTypeScriptCodeGeneratorTests.cs (6)
193var testConfig = context.DtoTypes.First(dto => dto.Name == nameof(TestConfigDto)); 986var nullableNumberArrayDto = new AtsDtoTypeInfo 1962var processCommandExportOptions = Assert.Single(atsContext.DtoTypes, dto => dto.Name == "ProcessCommandExportOptions"); 2617var dto = Assert.Single(context.DtoTypes, dto => dto.TypeId == options.Type.TypeId); 2669var testConfigDto = atsContext.DtoTypes 2708var deeplyNestedDto = atsContext.DtoTypes
Aspire.Hosting.Native.CodeGeneration (11)
NativeCSharpProjection.cs (1)
35foreach (var dto in context.DtoTypes.OrderBy(type => type.Name, StringComparer.Ordinal))
src\Aspire.Hosting.RemoteHost\AtsCapabilityScanner.cs (10)
36public List<AtsDtoTypeInfo> DtoTypes { get; init; } = []; 145var allDtoTypes = new List<AtsDtoTypeInfo>(); 189foreach (var dtoType in result.DtoTypes) 378var dtoTypes = new List<AtsDtoTypeInfo>(); 442var dtoInfo = CreateDtoTypeInfo(type, assemblyExportedTypeCache, diagnostics); 605List<AtsDtoTypeInfo> dtoTypes) 624foreach (var dto in dtoTypes) 715List<AtsDtoTypeInfo> dtoTypes, 740foreach (var dto in dtoTypes) 1148private static AtsDtoTypeInfo? CreateDtoTypeInfo(
Aspire.Hosting.Native.Core.Tests (1)
NativeCSharpClientTests.cs (1)
40foreach (var dto in contract.DtoTypes)
Aspire.Hosting.RemoteHost (18)
AtsCapabilityScanner.cs (10)
36public List<AtsDtoTypeInfo> DtoTypes { get; init; } = []; 145var allDtoTypes = new List<AtsDtoTypeInfo>(); 189foreach (var dtoType in result.DtoTypes) 378var dtoTypes = new List<AtsDtoTypeInfo>(); 442var dtoInfo = CreateDtoTypeInfo(type, assemblyExportedTypeCache, diagnostics); 605List<AtsDtoTypeInfo> dtoTypes) 624foreach (var dto in dtoTypes) 715List<AtsDtoTypeInfo> dtoTypes, 740foreach (var dto in dtoTypes) 1148private static AtsDtoTypeInfo? CreateDtoTypeInfo(
AtsContextFilter.cs (7)
242foreach (var dtoType in context.DtoTypes.Where(type => includedDtoTypeIds.Contains(type.TypeId)).ToList()) 415IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById, 431if (dtoTypesById.TryGetValue(typeRef.TypeId, out var dtoType) && includedDtoTypeIds.Add(dtoType.TypeId)) 457IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById, 475AtsDtoTypeInfo dtoType, 477IReadOnlyDictionary<string, AtsDtoTypeInfo> dtoTypesById, 559foreach (var type in context.DtoTypes)
CodeGeneration\CodeGenerationService.cs (1)
172private static DtoTypeResponse MapDtoType(AtsDtoTypeInfo t) => new()
Aspire.Hosting.RemoteHost.Tests (9)
AtsCapabilityScannerTests.cs (4)
428var dto = Assert.Single(result.DtoTypes, d => d.TypeId == AtsTypeMapping.DeriveTypeId(typeof(HttpCommandExportOptions))); 455var requestDataDto = Assert.Single(result.DtoTypes, d => d.TypeId == AtsTypeMapping.DeriveTypeId(typeof(HttpCommandRequestExportData))); 514var dto = Assert.Single(result.DtoTypes, d => d.ClrType == typeof(NullableScalarDto)); 793var dto = Assert.Single(result.DtoTypes, d => d.TypeId == AtsTypeMapping.DeriveTypeId(typeof(InitPropertiesDto)));
AtsContextFilterTests.cs (4)
264var ownedDtoType = new AtsDtoTypeInfo 422var selectedDtoType = new AtsDtoTypeInfo 443var referencedCoreDtoType = new AtsDtoTypeInfo 475var exportedValueOnlyDtoType = new AtsDtoTypeInfo
CallbackProxyTests.cs (1)
473? new List<AtsDtoTypeInfo>
Aspire.TypeSystem (1)
AtsContext.cs (1)
72public required IReadOnlyList<AtsDtoTypeInfo> DtoTypes { get; init; }