Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
<ToolingPackagesVersion>1.1.1.19562</ToolingPackagesVersion>
<ToolingPackagesVersion>1.1.1.19570</ToolingPackagesVersion>
<AccessToNugetFeed Condition="'$(AccessToNugetFeed)' == ''">false</AccessToNugetFeed>
<!-- Enable NuGet vulnerability audit on public nuget.org feed. Restrict to nuget.org's service index
to avoid NU1900 errors when the private Azure DevOps feed is unavailable (e.g. CI without credentials). -->
Expand Down
6 changes: 2 additions & 4 deletions EssentialCSharp.Web/Services/ChapterDescriptionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public ChapterDescriptionService(IWebHostEnvironment environment)
}

using FileStream stream = File.OpenRead(path);
List<ChapterDescription> entries = JsonSerializer.Deserialize<List<ChapterDescription>>(stream)
List<SiteMappingDescription> entries = JsonSerializer.Deserialize<List<SiteMappingDescription>>(stream)
?? throw new InvalidDataException($"No chapter descriptions found in {path}");
Dictionary<string, string> descriptions = new(StringComparer.OrdinalIgnoreCase);
foreach (ChapterDescription entry in entries)
foreach (SiteMappingDescription entry in entries)
{
foreach (string key in entry.Keys)
{
Expand All @@ -42,6 +42,4 @@ public string GetDescription(SiteMapping mapping)
string heading = mapping.IndentLevel == 0 ? mapping.ChapterTitle : mapping.RawHeading;
return $"Learn about {heading} in Essential C# with practical examples and explanations from the online C# guide.";
}

private sealed record ChapterDescription(List<string> Keys, string Value);
}
Loading