Skip to content

Commit 6a9b6c4

Browse files
committed
remove temporary pragma's while refactoring
1 parent f4e3370 commit 6a9b6c4

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

src/tooling/docs-assembler/Cli/RepositoryCommands.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public async Task<int> BuildAll(
130130
var navigation = new GlobalNavigation(assembleSources, navigationFile);
131131

132132
var pathProvider = new GlobalNavigationPathProvider(navigationFile, assembleSources, assembleContext);
133-
var htmlWriter = new GlobalNavigationHtmlWriter(navigationFile, assembleContext, navigation, assembleSources);
133+
var htmlWriter = new GlobalNavigationHtmlWriter(navigation);
134134
var legacyPageChecker = new LegacyPageChecker();
135135
var historyMapper = new PageLegacyUrlMapper(legacyPageChecker, assembleSources.HistoryMappings);
136136

src/tooling/docs-assembler/Navigation/GlobalNavigation.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ public record GlobalNavigation : IPositionalNavigation
2727

2828
public FrozenDictionary<int, INavigationItem> NavigationIndexedByOrder { get; }
2929

30-
#pragma warning disable IDE0052
3130
private ImmutableHashSet<Uri> Phantoms { get; }
32-
#pragma warning restore IDE0052
3331

3432
private TableOfContentsTree RootContentTree { get; }
3533

src/tooling/docs-assembler/Navigation/GlobalNavigationHtmlWriter.cs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,17 @@
33
// See the LICENSE file in the project root for more information
44

55
using System.Collections.Concurrent;
6-
using System.Collections.Immutable;
7-
using System.Diagnostics.CodeAnalysis;
8-
using Elastic.Documentation.Extensions;
96
using Elastic.Documentation.Site.Navigation;
107
using Elastic.Markdown.IO.Navigation;
118

129
namespace Documentation.Assembler.Navigation;
1310

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
2212
{
2313
private readonly ConcurrentDictionary<(string, int), string> _renderedNavigationCache = [];
2414

25-
private ImmutableHashSet<Uri> Phantoms { get; } = [.. navigationFile.Phantoms.Select(p => p.Source)];
26-
2715
public async Task<NavigationRenderResult> RenderNavigation(IRootNavigationItem<INavigationModel, INavigationItem> currentRootNavigation, int maxLevel, Cancel ctx = default)
2816
{
29-
await Task.CompletedTask;
3017
INodeNavigationItem<INavigationModel, INavigationItem> lastParentBeforeRoot = currentRootNavigation;
3118
INodeNavigationItem<INavigationModel, INavigationItem> parent = currentRootNavigation;
3219
while (parent.Parent is not null)

0 commit comments

Comments
 (0)