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)
240
var matchedSection = doc.Source.
Sections
.FirstOrDefault(s =>
256
Sections = [.. doc.Source.
Sections
.Select(static s => s.Heading)]
288
matchedSection = doc.Source.
Sections
[i].Heading;
443
.. source.
Sections
.Select(static s => new IndexedSection(s))
Aspire.Cli.Tests (30)
Mcp\Docs\LlmsTxtParserTests.cs (30)
107
Assert.Equal(3, doc.
Sections
.Count);
109
Assert.Equal("Section One", doc.
Sections
[0].Heading);
110
Assert.Equal(2, doc.
Sections
[0].Level);
112
Assert.Equal("Section Two", doc.
Sections
[1].Heading);
113
Assert.Equal(2, doc.
Sections
[1].Level);
115
Assert.Equal("Subsection", doc.
Sections
[2].Heading);
116
Assert.Equal(3, doc.
Sections
[2].Level);
138
var parentSection = doc.
Sections
.First(s => s.Heading == "Parent Section");
356
Assert.Equal(2, overview.
Sections
.Count);
357
Assert.Equal("Why use Aspire?", overview.
Sections
[0].Heading);
358
Assert.Equal("Getting started", overview.
Sections
[1].Heading);
365
Assert.Single(serviceDefaults.
Sections
);
366
Assert.Equal("Configuration", serviceDefaults.
Sections
[0].Heading);
470
var h2Sections = doc.
Sections
.Where(s => s.Level == 2).Select(s => s.Heading).ToList();
474
var h3Sections = doc.
Sections
.Where(s => s.Level == 3).Select(s => s.Heading).ToList();
502
Assert.Single(doc.
Sections
);
503
Assert.Equal("Real Section", doc.
Sections
[0].Heading);
504
Assert.Equal(2, doc.
Sections
[0].Level);
517
Assert.Single(doc.
Sections
);
518
Assert.Equal("Getting Started", doc.
Sections
[0].Heading);
569
Assert.True(certificatesDoc.
Sections
.Count > 0, "Certificate doc should have sections");
572
var h2Sections = certificatesDoc.
Sections
.Where(s => s.Level == 2).Select(s => s.Heading).ToList();
579
var h3Sections = certificatesDoc.
Sections
.Where(s => s.Level == 3).ToList();
589
Assert.True(appHostConfigDoc.
Sections
.Count > 0, "AppHost config doc should have sections");
591
var h2Sections = appHostConfigDoc.
Sections
.Where(s => s.Level == 2).Select(s => s.Heading).ToList();
605
Assert.True(dockerComposeDoc.
Sections
.Count > 0, "Docker Compose doc should have sections");
607
var h2Sections = dockerComposeDoc.
Sections
.Where(s => s.Level == 2).Select(s => s.Heading).ToList();
621
Assert.True(eventingDoc.
Sections
.Count > 0, "Eventing doc should have sections");
623
var h2Sections = eventingDoc.
Sections
.Where(s => s.Level == 2).Select(s => s.Heading).ToList();
630
var h3Sections = eventingDoc.
Sections
.Where(s => s.Level == 3).Select(s => s.Heading).ToList();