6 instantiations of GoDeclaration
Aspire.Hosting.CodeGeneration.Go (6)
AtsGoCodeGenerator.ApiProjection.cs (1)
561markers.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
34 references to GoDeclaration
Aspire.Hosting.CodeGeneration.Go (29)
AtsGoCodeGenerator.ApiProjection.cs (20)
151foreach (var declaration in declarations) 187IReadOnlyList<GoDeclaration> declarations, 188ILookup<string, GoDeclaration> membersByOwner, 192foreach (var declaration in declarations) 222var createBuilder = declarations.FirstOrDefault(declaration => 241foreach (var type in declarations.Where(declaration => 300foreach (var type in declarations.Where(declaration => declaration.Kind == GoDeclarationKind.Type)) 330GoDeclaration type, 331List<GoDeclaration> members, 877IEnumerable<GoDeclaration> declarations, 881foreach (var declaration in declarations) 918private static GoApiErrorModel InferErrorModel(GoDeclaration method) 932private static string RenderFieldDeclaration(GoDeclaration field) 966private static string RenderTypeFragment(GoDeclaration type, IReadOnlyList<GoDeclaration> members) 973foreach (var field in members.Where(member => member.Kind == GoDeclarationKind.Field)) 985foreach (var constant in constants) 993foreach (var method in members.Where(member => member.Kind == GoDeclarationKind.Method)) 1089public GoDeclaration ErrMethod { get; set; } = null!; 1094public GoDeclaration BuildMethod { get; set; } = null!;
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 (5)
GoApiExportTests.cs (5)
21private static readonly Lazy<IReadOnlyList<GoDeclaration>> s_generatedDeclarations = new(ScanGeneratedSdk); 489var greeter = declarations[0]; 512var constant = Assert.Single(GoDeclarationScanner.Scan(source, includeBodyDocs: false), declaration => declaration.Kind == GoDeclarationKind.Constant); 554var err = Assert.Single(declarations, declaration => declaration is { Kind: GoDeclarationKind.Method, Name: "Err", Owner: "handleWrapperBase" }); 701private static IReadOnlyList<GoDeclaration> ScanGeneratedSdk()