1 write to Sections
aspire (1)
Mcp\Docs\LlmsTxtParser.cs (1)
207Sections = sections
34 references to Sections
aspire (4)
Mcp\Docs\DocsIndexService.cs (4)
277var matchedSection = doc.Source.Sections.FirstOrDefault(s => 293Sections = [.. doc.Source.Sections.Select(static s => s.Heading)] 329matchedSection = doc.Source.Sections[i].Heading; 602Sections = [.. 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"); 357Assert.Equal(2, overview.Sections.Count); 358Assert.Equal("Why use Aspire?", overview.Sections[0].Heading); 359Assert.Equal("Getting started", overview.Sections[1].Heading); 366Assert.Single(serviceDefaults.Sections); 367Assert.Equal("Configuration", serviceDefaults.Sections[0].Heading); 471var h2Sections = doc.Sections.Where(s => s.Level == 2).Select(s => s.Heading).ToList(); 475var h3Sections = doc.Sections.Where(s => s.Level == 3).Select(s => s.Heading).ToList(); 503Assert.Single(doc.Sections); 504Assert.Equal("Real Section", doc.Sections[0].Heading); 505Assert.Equal(2, doc.Sections[0].Level); 518Assert.Single(doc.Sections); 519Assert.Equal("Getting Started", doc.Sections[0].Heading); 570Assert.True(certificatesDoc.Sections.Count > 0, "Certificate doc should have sections"); 573var h2Sections = certificatesDoc.Sections.Where(s => s.Level == 2).Select(s => s.Heading).ToList(); 580var h3Sections = certificatesDoc.Sections.Where(s => s.Level == 3).ToList(); 590Assert.True(appHostConfigDoc.Sections.Count > 0, "AppHost config doc should have sections"); 592var h2Sections = appHostConfigDoc.Sections.Where(s => s.Level == 2).Select(s => s.Heading).ToList(); 606Assert.True(dockerComposeDoc.Sections.Count > 0, "Docker Compose doc should have sections"); 608var h2Sections = dockerComposeDoc.Sections.Where(s => s.Level == 2).Select(s => s.Heading).ToList(); 622Assert.True(eventingDoc.Sections.Count > 0, "Eventing doc should have sections"); 624var h2Sections = eventingDoc.Sections.Where(s => s.Level == 2).Select(s => s.Heading).ToList(); 631var h3Sections = eventingDoc.Sections.Where(s => s.Level == 3).Select(s => s.Heading).ToList();