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