1 write to Sections
aspire (1)
Mcp\Docs\LlmsTxtParser.cs (1)
207
Sections
= sections
34 references to Sections
aspire (4)
Mcp\Docs\DocsIndexService.cs (4)
277
var matchedSection = doc.Source.
Sections
.FirstOrDefault(s =>
293
Sections = [.. doc.Source.
Sections
.Select(static s => s.Heading)]
329
matchedSection = doc.Source.
Sections
[i].Heading;
602
Sections = [.. source.
Sections
.Select(static s => new IndexedSection(s))];
Aspire.Cli.Tests (30)
Mcp\Docs\LlmsTxtParserTests.cs (30)
108
Assert.Equal(3, doc.
Sections
.Count);
110
Assert.Equal("Section One", doc.
Sections
[0].Heading);
111
Assert.Equal(2, doc.
Sections
[0].Level);
113
Assert.Equal("Section Two", doc.
Sections
[1].Heading);
114
Assert.Equal(2, doc.
Sections
[1].Level);
116
Assert.Equal("Subsection", doc.
Sections
[2].Heading);
117
Assert.Equal(3, doc.
Sections
[2].Level);
139
var parentSection = doc.
Sections
.First(s => s.Heading == "Parent Section");
357
Assert.Equal(2, overview.
Sections
.Count);
358
Assert.Equal("Why use Aspire?", overview.
Sections
[0].Heading);
359
Assert.Equal("Getting started", overview.
Sections
[1].Heading);
366
Assert.Single(serviceDefaults.
Sections
);
367
Assert.Equal("Configuration", serviceDefaults.
Sections
[0].Heading);
471
var h2Sections = doc.
Sections
.Where(s => s.Level == 2).Select(s => s.Heading).ToList();
475
var h3Sections = doc.
Sections
.Where(s => s.Level == 3).Select(s => s.Heading).ToList();
503
Assert.Single(doc.
Sections
);
504
Assert.Equal("Real Section", doc.
Sections
[0].Heading);
505
Assert.Equal(2, doc.
Sections
[0].Level);
518
Assert.Single(doc.
Sections
);
519
Assert.Equal("Getting Started", doc.
Sections
[0].Heading);
570
Assert.True(certificatesDoc.
Sections
.Count > 0, "Certificate doc should have sections");
573
var h2Sections = certificatesDoc.
Sections
.Where(s => s.Level == 2).Select(s => s.Heading).ToList();
580
var h3Sections = certificatesDoc.
Sections
.Where(s => s.Level == 3).ToList();
590
Assert.True(appHostConfigDoc.
Sections
.Count > 0, "AppHost config doc should have sections");
592
var h2Sections = appHostConfigDoc.
Sections
.Where(s => s.Level == 2).Select(s => s.Heading).ToList();
606
Assert.True(dockerComposeDoc.
Sections
.Count > 0, "Docker Compose doc should have sections");
608
var h2Sections = dockerComposeDoc.
Sections
.Where(s => s.Level == 2).Select(s => s.Heading).ToList();
622
Assert.True(eventingDoc.
Sections
.Count > 0, "Eventing doc should have sections");
624
var h2Sections = eventingDoc.
Sections
.Where(s => s.Level == 2).Select(s => s.Heading).ToList();
631
var h3Sections = eventingDoc.
Sections
.Where(s => s.Level == 3).Select(s => s.Heading).ToList();