@@ -25,9 +25,12 @@ public class Analyser : IDisposable
2525
2626 public readonly ILogger Logger ;
2727
28- public Analyser ( IProgressMonitor pm , ILogger logger )
28+ public readonly bool AddAssemblyTrapPrefix ;
29+
30+ public Analyser ( IProgressMonitor pm , ILogger logger , bool addAssemblyTrapPrefix )
2931 {
3032 Logger = logger ;
33+ AddAssemblyTrapPrefix = addAssemblyTrapPrefix ;
3134 Logger . Log ( Severity . Info , "EXTRACTION STARTING at {0}" , DateTime . Now ) ;
3235 stopWatch . Start ( ) ;
3336 progressMonitor = pm ;
@@ -231,7 +234,7 @@ void DoAnalyseCompilation(string cwd, string[] args)
231234 var projectLayout = layout . LookupProjectOrDefault ( assemblyPath ) ;
232235 var trapWriter = projectLayout . CreateTrapWriter ( Logger , assemblyPath , true , options . TrapCompression ) ;
233236 compilationTrapFile = trapWriter ; // Dispose later
234- var cx = extractor . CreateContext ( compilation . Clone ( ) , trapWriter , new AssemblyScope ( assembly , assemblyPath , true ) ) ;
237+ var cx = extractor . CreateContext ( compilation . Clone ( ) , trapWriter , new AssemblyScope ( assembly , assemblyPath , true ) , AddAssemblyTrapPrefix ) ;
235238
236239 compilationEntity = new Entities . Compilation ( cx , cwd , args ) ;
237240 }
@@ -286,7 +289,7 @@ void DoAnalyseAssembly(PortableExecutableReference r)
286289
287290 if ( assembly != null )
288291 {
289- var cx = extractor . CreateContext ( c , trapWriter , new AssemblyScope ( assembly , assemblyPath , false ) ) ;
292+ var cx = extractor . CreateContext ( c , trapWriter , new AssemblyScope ( assembly , assemblyPath , false ) , AddAssemblyTrapPrefix ) ;
290293
291294 foreach ( var module in assembly . Modules )
292295 {
@@ -372,7 +375,7 @@ void DoExtractTree(SyntaxTree tree)
372375
373376 if ( ! upToDate )
374377 {
375- Context cx = extractor . CreateContext ( compilation . Clone ( ) , trapWriter , new SourceScope ( tree ) ) ;
378+ Context cx = extractor . CreateContext ( compilation . Clone ( ) , trapWriter , new SourceScope ( tree ) , AddAssemblyTrapPrefix ) ;
376379 Populators . CompilationUnit . Extract ( cx , tree . GetRoot ( ) ) ;
377380 cx . PopulateAll ( ) ;
378381 cx . ExtractComments ( cx . CommentGenerator ) ;
0 commit comments