|
3 | 3 | // See the LICENSE file in the project root for more information |
4 | 4 |
|
5 | 5 | using System.Collections.Concurrent; |
6 | | -using System.Collections.Immutable; |
7 | | -using System.Diagnostics.CodeAnalysis; |
8 | | -using Elastic.Documentation.Extensions; |
9 | 6 | using Elastic.Documentation.Site.Navigation; |
10 | 7 | using Elastic.Markdown.IO.Navigation; |
11 | 8 |
|
12 | 9 | namespace Documentation.Assembler.Navigation; |
13 | 10 |
|
14 | | -#pragma warning disable CS9113 // Parameter is unread. |
15 | | -public class GlobalNavigationHtmlWriter( |
16 | | - GlobalNavigationFile navigationFile, |
17 | | - AssembleContext assembleContext, |
18 | | - GlobalNavigation globalNavigation, |
19 | | - AssembleSources assembleSources |
20 | | -) : INavigationHtmlWriter |
21 | | -#pragma warning restore CS9113 // Parameter is unread. |
| 11 | +public class GlobalNavigationHtmlWriter(GlobalNavigation globalNavigation) : INavigationHtmlWriter |
22 | 12 | { |
23 | 13 | private readonly ConcurrentDictionary<(string, int), string> _renderedNavigationCache = []; |
24 | 14 |
|
25 | | - private ImmutableHashSet<Uri> Phantoms { get; } = [.. navigationFile.Phantoms.Select(p => p.Source)]; |
26 | | - |
27 | 15 | public async Task<NavigationRenderResult> RenderNavigation(IRootNavigationItem<INavigationModel, INavigationItem> currentRootNavigation, int maxLevel, Cancel ctx = default) |
28 | 16 | { |
29 | | - await Task.CompletedTask; |
30 | 17 | INodeNavigationItem<INavigationModel, INavigationItem> lastParentBeforeRoot = currentRootNavigation; |
31 | 18 | INodeNavigationItem<INavigationModel, INavigationItem> parent = currentRootNavigation; |
32 | 19 | while (parent.Parent is not null) |
|
0 commit comments