6 instantiations of GoDeclaration
Aspire.Hosting.CodeGeneration.Go (6)
AtsGoCodeGenerator.ApiProjection.cs (1)
711markers.Select(marker => new GoDeclaration { Kind = GoDeclarationKind.Method, Name = marker, Signature = $"{marker}()" }),
GoDeclarationScanner.cs (5)
257declarations.Add(new GoDeclaration 315declarations.Add(new GoDeclaration 369declarations.Add(new GoDeclaration 395declarations.Add(new GoDeclaration 440declarations.Add(new GoDeclaration
37 references to GoDeclaration
Aspire.Hosting.CodeGeneration.Go (31)
AtsGoCodeGenerator.ApiProjection.cs (21)
164foreach (var declaration in declarations) 200IReadOnlyList<GoDeclaration> declarations, 201ILookup<string, GoDeclaration> membersByOwner, 205foreach (var declaration in declarations) 235var createBuilder = declarations.FirstOrDefault(declaration => 254foreach (var type in declarations.Where(declaration => 342foreach (var type in declarations.Where(declaration => declaration.Kind == GoDeclarationKind.Type)) 401foreach (var function in declarations.Where(declaration => declaration.Kind == GoDeclarationKind.Function)) 467GoDeclaration type, 468List<GoDeclaration> members, 1025IEnumerable<GoDeclaration> declarations, 1029foreach (var declaration in declarations) 1076private static GoApiErrorModel InferErrorModel(GoDeclaration method) 1090private static string RenderFieldDeclaration(GoDeclaration field) 1124private static string RenderTypeFragment(GoDeclaration type, IReadOnlyList<GoDeclaration> members) 1131foreach (var field in members.Where(member => member.Kind == GoDeclarationKind.Field)) 1143foreach (var constant in constants) 1151foreach (var method in members.Where(member => member.Kind == GoDeclarationKind.Method)) 1247public GoDeclaration ErrMethod { get; set; } = null!; 1252public GoDeclaration BuildMethod { get; set; } = null!;
AtsGoCodeGenerator.cs (1)
383foreach (var declaration in GoDeclarationScanner.ScanRuntime(GetEmbeddedResource(resourceName)))
GoDeclarationScanner.cs (9)
72/// on <see cref="GoDeclaration.Owner"/>. <see cref="ReadTypeDeclaration"/> reads the one unexported type 87public static IReadOnlyList<GoDeclaration> Scan(string source, bool includeBodyDocs) 92var declarations = new List<GoDeclaration>(); 136public static IReadOnlyList<GoDeclaration> ScanRuntime(string source) 151/// <param name="signature">A <see cref="GoDeclaration.Signature"/> of a function or method.</param> 239List<GoDeclaration> declarations) 299private static void AddField(string owner, string line, List<string> doc, List<GoDeclaration> declarations) 331private static void ScanFunction(string line, List<string> doc, List<GoDeclaration> declarations) 412List<GoDeclaration> declarations)
Aspire.Hosting.CodeGeneration.Go.Tests (6)
GoApiExportTests.cs (6)
24private static readonly Lazy<IReadOnlyList<GoDeclaration>> s_generatedDeclarations = new(ScanGeneratedSdk); 627var greeter = declarations[0]; 650var constant = Assert.Single(GoDeclarationScanner.Scan(source, includeBodyDocs: false), declaration => declaration.Kind == GoDeclarationKind.Constant); 694var declaration = Assert.Single(declarations); 705var err = Assert.Single(declarations, declaration => declaration is { Kind: GoDeclarationKind.Method, Name: "Err", Owner: "handleWrapperBase" }); 852private static IReadOnlyList<GoDeclaration> ScanGeneratedSdk()