30
30
using System . Xml . Linq ;
31
31
32
32
using ICSharpCode . ILSpyX . Extensions ;
33
+ using ICSharpCode . ILSpyX . FileLoaders ;
33
34
34
35
namespace ICSharpCode . ILSpyX
35
36
{
@@ -128,6 +129,7 @@ public event NotifyCollectionChangedEventHandler CollectionChanged {
128
129
129
130
public bool ApplyWinRTProjections { get ; set ; }
130
131
public bool UseDebugSymbols { get ; set ; }
132
+ public FileLoaderRegistry LoaderRegistry => this . manager . LoaderRegistry ;
131
133
132
134
/// <summary>
133
135
/// Gets the loaded assemblies. This method is thread-safe.
@@ -279,7 +281,7 @@ public LoadedAssembly OpenAssembly(string file, bool isAutoLoaded = false)
279
281
{
280
282
file = Path . GetFullPath ( file ) ;
281
283
return OpenAssembly ( file , ( ) => {
282
- var newAsm = new LoadedAssembly ( this , file , applyWinRTProjections : ApplyWinRTProjections , useDebugSymbols : UseDebugSymbols ) ;
284
+ var newAsm = new LoadedAssembly ( this , file , fileLoaders : manager . LoaderRegistry , applyWinRTProjections : ApplyWinRTProjections , useDebugSymbols : UseDebugSymbols ) ;
283
285
newAsm . IsAutoLoaded = isAutoLoaded ;
284
286
return newAsm ;
285
287
} ) ;
@@ -293,6 +295,7 @@ public LoadedAssembly OpenAssembly(string file, Stream? stream, bool isAutoLoade
293
295
file = Path . GetFullPath ( file ) ;
294
296
return OpenAssembly ( file , ( ) => {
295
297
var newAsm = new LoadedAssembly ( this , file , stream : Task . FromResult ( stream ) ,
298
+ fileLoaders : manager . LoaderRegistry ,
296
299
applyWinRTProjections : ApplyWinRTProjections , useDebugSymbols : UseDebugSymbols ) ;
297
300
newAsm . IsAutoLoaded = isAutoLoaded ;
298
301
return newAsm ;
@@ -345,6 +348,7 @@ LoadedAssembly OpenAssembly(string file, Func<LoadedAssembly> load)
345
348
return null ;
346
349
347
350
var newAsm = new LoadedAssembly ( this , file , stream : Task . FromResult < Stream ? > ( stream ) ,
351
+ fileLoaders : manager . LoaderRegistry ,
348
352
applyWinRTProjections : ApplyWinRTProjections , useDebugSymbols : UseDebugSymbols ) ;
349
353
newAsm . IsAutoLoaded = target . IsAutoLoaded ;
350
354
@@ -374,6 +378,7 @@ LoadedAssembly OpenAssembly(string file, Func<LoadedAssembly> load)
374
378
if ( index < 0 )
375
379
return null ;
376
380
var newAsm = new LoadedAssembly ( this , target . FileName , pdbFileName : target . PdbFileName ,
381
+ fileLoaders : manager . LoaderRegistry ,
377
382
applyWinRTProjections : ApplyWinRTProjections , useDebugSymbols : UseDebugSymbols ) ;
378
383
newAsm . IsAutoLoaded = target . IsAutoLoaded ;
379
384
lock ( lockObj )
0 commit comments