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