@@ -86,7 +86,7 @@ internal static string GetUniqueIdFromDiagnostic(Diagnostic diagnostic)
8686
8787 private readonly ConfigurationService _configurationService ;
8888
89- private readonly WorkspaceService _workplaceService ;
89+ private readonly WorkspaceService _workspaceService ;
9090
9191 private readonly int _analysisDelayMillis ;
9292
@@ -115,7 +115,7 @@ public AnalysisService(
115115 _logger = loggerFactory . CreateLogger < AnalysisService > ( ) ;
116116 _languageServer = languageServer ;
117117 _configurationService = configurationService ;
118- _workplaceService = workspaceService ;
118+ _workspaceService = workspaceService ;
119119 _analysisDelayMillis = 750 ;
120120 _mostRecentCorrectionsByFile = new ConcurrentDictionary < ScriptFile , CorrectionTableEntry > ( ) ;
121121 _analysisEngineLazy = new Lazy < PssaCmdletAnalysisEngine > ( InstantiateAnalysisEngine ) ;
@@ -223,9 +223,10 @@ public async Task<string> GetCommentHelpText(string functionText, string helpLoc
223223 /// </summary>
224224 /// <param name="documentUri">The URI string of the file to get code actions for.</param>
225225 /// <returns>A threadsafe readonly dictionary of the code actions of the particular file.</returns>
226- public async Task < IReadOnlyDictionary < string , MarkerCorrection > > GetMostRecentCodeActionsForFileAsync ( ScriptFile scriptFile )
226+ public async Task < IReadOnlyDictionary < string , MarkerCorrection > > GetMostRecentCodeActionsForFileAsync ( DocumentUri uri )
227227 {
228- if ( ! _mostRecentCorrectionsByFile . TryGetValue ( scriptFile , out CorrectionTableEntry corrections ) )
228+ if ( ! _workspaceService . TryGetFile ( uri , out ScriptFile file )
229+ || ! _mostRecentCorrectionsByFile . TryGetValue ( file , out CorrectionTableEntry corrections ) )
229230 {
230231 return null ;
231232 }
@@ -334,7 +335,7 @@ private bool TryFindSettingsFile(out string settingsFilePath)
334335 return false ;
335336 }
336337
337- settingsFilePath = _workplaceService . ResolveWorkspacePath ( configuredPath ) ;
338+ settingsFilePath = _workspaceService . ResolveWorkspacePath ( configuredPath ) ;
338339
339340 if ( settingsFilePath == null
340341 || ! File . Exists ( settingsFilePath ) )
@@ -349,7 +350,7 @@ private bool TryFindSettingsFile(out string settingsFilePath)
349350
350351 private void ClearOpenFileMarkers ( )
351352 {
352- foreach ( ScriptFile file in _workplaceService . GetOpenedFiles ( ) )
353+ foreach ( ScriptFile file in _workspaceService . GetOpenedFiles ( ) )
353354 {
354355 ClearMarkers ( file ) ;
355356 }
0 commit comments