Skip to content

Commit

Permalink
Search appNav by file name
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe Birbaum committed May 10, 2021
1 parent c191904 commit c0680b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Tool/src/Boost.Core/Navigation/AppNavigationService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Linq;
using System.Text.Json;
using Boost.Infrastructure;

Expand All @@ -16,8 +17,11 @@ public AppNavigationService(IBoostCommandContext commandContext)

public AppNavigation GetNavigation()
{
string? name = _commandContext.ToolAssembly.GetManifestResourceNames()
.FirstOrDefault(x => x.EndsWith("AppNavigation.json"));

Stream? stream = _commandContext.ToolAssembly
.GetManifestResourceStream("Boost.Tool.AppNavigation.json");
.GetManifestResourceStream(name!);

if (stream is { })
{
Expand Down

0 comments on commit c0680b1

Please sign in to comment.