|
|
@ -41,6 +41,8 @@ namespace ICSharpCode.ILSpy |
|
|
|
/// <summary>Dirty flag, used to mark modifications so that the list is saved later</summary>
|
|
|
|
/// <summary>Dirty flag, used to mark modifications so that the list is saved later</summary>
|
|
|
|
bool dirty; |
|
|
|
bool dirty; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
internal readonly ConcurrentDictionary<string, LoadedAssembly> assemblyLookupCache = new ConcurrentDictionary<string, LoadedAssembly>(); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// The assemblies in this list.
|
|
|
|
/// The assemblies in this list.
|
|
|
|
/// Needs locking for multi-threaded access!
|
|
|
|
/// Needs locking for multi-threaded access!
|
|
|
@ -101,6 +103,7 @@ namespace ICSharpCode.ILSpy |
|
|
|
|
|
|
|
|
|
|
|
void Assemblies_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) |
|
|
|
void Assemblies_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
assemblyLookupCache.Clear(); |
|
|
|
// Whenever the assembly list is modified, mark it as dirty
|
|
|
|
// Whenever the assembly list is modified, mark it as dirty
|
|
|
|
// and enqueue a task that saves it once the UI has finished modifying the assembly list.
|
|
|
|
// and enqueue a task that saves it once the UI has finished modifying the assembly list.
|
|
|
|
if (!dirty) { |
|
|
|
if (!dirty) { |
|
|
@ -111,6 +114,7 @@ namespace ICSharpCode.ILSpy |
|
|
|
delegate { |
|
|
|
delegate { |
|
|
|
dirty = false; |
|
|
|
dirty = false; |
|
|
|
AssemblyListManager.SaveList(this); |
|
|
|
AssemblyListManager.SaveList(this); |
|
|
|
|
|
|
|
assemblyLookupCache.Clear(); |
|
|
|
}) |
|
|
|
}) |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|