This commit is contained in:
Matt Parker
2025-10-24 22:10:47 +10:00
parent e226162c27
commit 91bb5200aa
2 changed files with 3 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ public sealed class IdeFileWatcher(ILogger<IdeFileWatcher> logger) : IDisposable
fileWatcher.OnCreated += OnEvent;
fileWatcher.OnDeleted += OnEvent;
fileWatcher.OnRenamed += OnEvent;
fileWatcher.OnError += static (s, e) => Console.WriteLine($"FileSystemWatcher: Error - {e.GetException().Message}");
fileWatcher.OnError += (s, e) => _logger.LogError(e.GetException(), "FileSystemWatcher: Error");
fileWatcher.Start();
_fileWatcher = fileWatcher;

View File

@@ -141,8 +141,9 @@ public partial class IdeRoot : Control
var timer = Stopwatch.StartNew();
var solutionModel = await VsPersistenceMapper.GetSolutionModel(path); // TODO: Probably refactor into a DI Service
timer.Stop();
_logger.LogInformation("Solution model fully created in {ElapsedMilliseconds} ms", timer.ElapsedMilliseconds);
await _nodeReadyTcs.Task;
// Do not use injected services until after _nodeReadyTcs - Services aren't injected until _Ready
_logger.LogInformation("Solution model fully created in {ElapsedMilliseconds} ms", timer.ElapsedMilliseconds);
_solutionExplorerPanel.SolutionModel = solutionModel;
_codeEditorPanel.Solution = solutionModel;
_bottomPanelManager.Solution = solutionModel;