@@ -19,7 +19,7 @@ namespace Semmle.Extraction.CSharp
1919 /// </summary>
2020 public class Analyser : IDisposable
2121 {
22- protected Extraction . Extractor ? extractor ;
22+ protected ExtractionContext ? ExtractionContext ;
2323 protected CSharpCompilation ? compilation ;
2424 protected CommonOptions ? options ;
2525 private protected Entities . Compilation ? compilationEntity ;
@@ -108,12 +108,12 @@ protected void SetReferencePaths()
108108 var def = reader . GetAssemblyDefinition ( ) ;
109109 assemblyIdentity = reader . GetString ( def . Name ) + " " + def . Version ;
110110 }
111- extractor . SetAssemblyFile ( assemblyIdentity , refPath ) ;
111+ ExtractionContext . SetAssemblyFile ( assemblyIdentity , refPath ) ;
112112
113113 }
114114 catch ( Exception ex ) // lgtm[cs/catch-of-all-exceptions]
115115 {
116- extractor . Message ( new Message ( "Exception reading reference file" , reference . FilePath , null , ex . StackTrace ) ) ;
116+ ExtractionContext . Message ( new Message ( "Exception reading reference file" , reference . FilePath , null , ex . StackTrace ) ) ;
117117 }
118118 }
119119 }
@@ -158,7 +158,7 @@ private void DoAnalyseReferenceAssembly(PortableExecutableReference r)
158158
159159 if ( compilation . GetAssemblyOrModuleSymbol ( r ) is IAssemblySymbol assembly )
160160 {
161- var cx = new Context ( extractor , compilation , trapWriter , new AssemblyScope ( assembly , assemblyPath ) , addAssemblyTrapPrefix ) ;
161+ var cx = new Context ( ExtractionContext , compilation , trapWriter , new AssemblyScope ( assembly , assemblyPath ) , addAssemblyTrapPrefix ) ;
162162
163163 foreach ( var module in assembly . Modules )
164164 {
@@ -201,7 +201,7 @@ private void DoExtractTree(SyntaxTree tree)
201201
202202 if ( ! upToDate )
203203 {
204- var cx = new Context ( extractor , compilation , trapWriter , new SourceScope ( tree ) , addAssemblyTrapPrefix ) ;
204+ var cx = new Context ( ExtractionContext , compilation , trapWriter , new SourceScope ( tree ) , addAssemblyTrapPrefix ) ;
205205 // Ensure that the file itself is populated in case the source file is totally empty
206206 var root = tree . GetRoot ( ) ;
207207 Entities . File . Create ( cx , root . SyntaxTree . FilePath ) ;
@@ -223,15 +223,15 @@ private void DoExtractTree(SyntaxTree tree)
223223 }
224224 catch ( Exception ex ) // lgtm[cs/catch-of-all-exceptions]
225225 {
226- extractor . Message ( new Message ( $ "Unhandled exception processing syntax tree. { ex . Message } ", tree . FilePath , null , ex . StackTrace ) ) ;
226+ ExtractionContext . Message ( new Message ( $ "Unhandled exception processing syntax tree. { ex . Message } ", tree . FilePath , null , ex . StackTrace ) ) ;
227227 }
228228 }
229229
230230 private void DoAnalyseCompilation ( )
231231 {
232232 try
233233 {
234- var assemblyPath = extractor . OutputPath ;
234+ var assemblyPath = ExtractionContext . OutputPath ;
235235 var stopwatch = new Stopwatch ( ) ;
236236 stopwatch . Start ( ) ;
237237 var currentTaskId = IncrementTaskCount ( ) ;
@@ -241,11 +241,11 @@ private void DoAnalyseCompilation()
241241 var assembly = compilation . Assembly ;
242242 var trapWriter = transformedAssemblyPath . CreateTrapWriter ( Logger , options . TrapCompression , discardDuplicates : false ) ;
243243 compilationTrapFile = trapWriter ; // Dispose later
244- var cx = new Context ( extractor , compilation , trapWriter , new AssemblyScope ( assembly , assemblyPath ) , addAssemblyTrapPrefix ) ;
244+ var cx = new Context ( ExtractionContext , compilation , trapWriter , new AssemblyScope ( assembly , assemblyPath ) , addAssemblyTrapPrefix ) ;
245245
246246 compilationEntity = Entities . Compilation . Create ( cx ) ;
247247
248- extractor . CompilationInfos . ForEach ( ci => trapWriter . Writer . compilation_info ( compilationEntity , ci . key , ci . value ) ) ;
248+ ExtractionContext . CompilationInfos . ForEach ( ci => trapWriter . Writer . compilation_info ( compilationEntity , ci . key , ci . value ) ) ;
249249
250250 ReportProgressTaskDone ( currentTaskId , assemblyPath , trapWriter . TrapFile , stopwatch . Elapsed , AnalysisAction . Extracted ) ;
251251 }
@@ -328,7 +328,7 @@ public virtual void Dispose()
328328 /// <summary>
329329 /// Number of errors encountered during extraction.
330330 /// </summary>
331- private int ExtractorErrors => extractor ? . Errors ?? 0 ;
331+ private int ExtractorErrors => ExtractionContext ? . Errors ?? 0 ;
332332
333333 /// <summary>
334334 /// Number of errors encountered by the compiler.
0 commit comments