diff --git a/src/SharpIDE.Application/Features/FilePersistence/IdeOpenTabsFileManager.cs b/src/SharpIDE.Application/Features/FilePersistence/IdeOpenTabsFileManager.cs index 562eaa0..0c78f5c 100644 --- a/src/SharpIDE.Application/Features/FilePersistence/IdeOpenTabsFileManager.cs +++ b/src/SharpIDE.Application/Features/FilePersistence/IdeOpenTabsFileManager.cs @@ -1,16 +1,12 @@ using System.Collections.Concurrent; -using SharpIDE.Application.Features.Analysis; -using SharpIDE.Application.Features.Events; using SharpIDE.Application.Features.SolutionDiscovery; namespace SharpIDE.Application.Features.FilePersistence; #pragma warning disable VSTHRD011 /// Holds the in memory copies of files, and manages saving/loading them to/from disk. -public class IdeOpenTabsFileManager(RoslynAnalysis roslynAnalysis) +public class IdeOpenTabsFileManager { - private readonly RoslynAnalysis _roslynAnalysis = roslynAnalysis; - private ConcurrentDictionary>> _openFiles = new(); /// Implicitly 'opens' a file if not already open, and returns the text. @@ -35,26 +31,6 @@ public class IdeOpenTabsFileManager(RoslynAnalysis roslynAnalysis) _openFiles[file] = newLazyTask; } - public async Task ReloadFileFromDisk(SharpIdeFile file) - { - if (!_openFiles.ContainsKey(file)) throw new InvalidOperationException("File is not open in memory."); - - var newTextTaskLazy = new Lazy>(() => File.ReadAllTextAsync(file.Path)); - _openFiles[file] = newTextTaskLazy; - var textTask = newTextTaskLazy.Value; - - } - - public async Task ReloadFileFromDiskIfOpenInEditor(SharpIdeFile file) - { - if (!_openFiles.ContainsKey(file)) return false; - - var newTextTaskLazy = new Lazy>(() => File.ReadAllTextAsync(file.Path)); - _openFiles[file] = newTextTaskLazy; - //var textTask = newTextTaskLazy.Value; - return true; - } - public async Task SaveFileAsync(SharpIdeFile file) { if (!_openFiles.ContainsKey(file)) throw new InvalidOperationException("File is not open in memory.");