3 writes to Sections
aspire (1)
Documentation\Docs\LlmsTxtParser.cs (1)
371Sections = sections
Aspire.Cli.Tests (2)
Mcp\Docs\DocsCacheTests.cs (2)
65Sections = [], 78Sections = [],
34 references to Sections
aspire (4)
Documentation\Docs\DocsIndexService.cs (4)
438var matchedSection = doc.Source.Sections.FirstOrDefault(s => 457Sections = [.. doc.Source.Sections.Select(static s => s.Heading)] 526matchedSection = doc.Source.Sections[i].Heading; 1120Sections = [.. source.Sections.Select(static s => new IndexedSection(s))];
Aspire.Cli.Tests (30)
Mcp\Docs\LlmsTxtParserTests.cs (30)
108Assert.Equal(3, doc.Sections.Count); 110Assert.Equal("Section One", doc.Sections[0].Heading); 111Assert.Equal(2, doc.Sections[0].Level); 113Assert.Equal("Section Two", doc.Sections[1].Heading); 114Assert.Equal(2, doc.Sections[1].Level); 116Assert.Equal("Subsection", doc.Sections[2].Heading); 117Assert.Equal(3, doc.Sections[2].Level); 139var parentSection = doc.Sections.First(s => s.Heading == "Parent Section"); 459Assert.Equal(2, overview.Sections.Count); 460Assert.Equal("Why use Aspire?", overview.Sections[0].Heading); 461Assert.Equal("Getting started", overview.Sections[1].Heading); 468Assert.Single(serviceDefaults.Sections); 469Assert.Equal("Configuration", serviceDefaults.Sections[0].Heading); 602var h2Sections = doc.Sections.Where(s => s.Level == 2).Select(s => s.Heading).ToList(); 606var h3Sections = doc.Sections.Where(s => s.Level == 3).Select(s => s.Heading).ToList(); 634Assert.Single(doc.Sections); 635Assert.Equal("Real Section", doc.Sections[0].Heading); 636Assert.Equal(2, doc.Sections[0].Level); 649Assert.Single(doc.Sections); 650Assert.Equal("Getting Started", doc.Sections[0].Heading); 701Assert.True(certificatesDoc.Sections.Count > 0, "Certificate doc should have sections"); 704var h2Sections = certificatesDoc.Sections.Where(s => s.Level == 2).Select(s => s.Heading).ToList(); 711var h3Sections = certificatesDoc.Sections.Where(s => s.Level == 3).ToList(); 721Assert.True(appHostConfigDoc.Sections.Count > 0, "AppHost config doc should have sections"); 723var h2Sections = appHostConfigDoc.Sections.Where(s => s.Level == 2).Select(s => s.Heading).ToList(); 737Assert.True(dockerComposeDoc.Sections.Count > 0, "Docker Compose doc should have sections"); 739var h2Sections = dockerComposeDoc.Sections.Where(s => s.Level == 2).Select(s => s.Heading).ToList(); 753Assert.True(eventingDoc.Sections.Count > 0, "Eventing doc should have sections"); 755var h2Sections = eventingDoc.Sections.Where(s => s.Level == 2).Select(s => s.Heading).ToList(); 762var h3Sections = eventingDoc.Sections.Where(s => s.Level == 3).Select(s => s.Heading).ToList();