|
|
|
|
@ -72,6 +72,8 @@ namespace ICSharpCode.ILSpy.AssemblyTree
@@ -72,6 +72,8 @@ namespace ICSharpCode.ILSpy.AssemblyTree
|
|
|
|
|
private readonly LanguageService languageService; |
|
|
|
|
private readonly IExportProvider exportProvider; |
|
|
|
|
|
|
|
|
|
private static Dispatcher UIThreadDispatcher => Application.Current.Dispatcher; |
|
|
|
|
|
|
|
|
|
public AssemblyTreeModel(SettingsService settingsService, LanguageService languageService, IExportProvider exportProvider) |
|
|
|
|
{ |
|
|
|
|
this.settingsService = settingsService; |
|
|
|
|
@ -198,7 +200,7 @@ namespace ICSharpCode.ILSpy.AssemblyTree
@@ -198,7 +200,7 @@ namespace ICSharpCode.ILSpy.AssemblyTree
|
|
|
|
|
{ |
|
|
|
|
var cmdArgs = CommandLineArguments.Create(args); |
|
|
|
|
|
|
|
|
|
await Dispatcher.InvokeAsync(async () => { |
|
|
|
|
await UIThreadDispatcher.InvokeAsync(async () => { |
|
|
|
|
|
|
|
|
|
if (!HandleCommandLineArguments(cmdArgs)) |
|
|
|
|
return; |
|
|
|
|
@ -256,7 +258,7 @@ namespace ICSharpCode.ILSpy.AssemblyTree
@@ -256,7 +258,7 @@ namespace ICSharpCode.ILSpy.AssemblyTree
|
|
|
|
|
|
|
|
|
|
// Make sure we wait for assemblies being loaded...
|
|
|
|
|
// BeginInvoke in LoadedAssembly.LookupReferencedAssemblyInternal
|
|
|
|
|
await Dispatcher.InvokeAsync(delegate { }, DispatcherPriority.Normal); |
|
|
|
|
await UIThreadDispatcher.InvokeAsync(delegate { }, DispatcherPriority.Normal); |
|
|
|
|
|
|
|
|
|
if (mr is { ParentModule.MetadataFile: not null }) |
|
|
|
|
{ |
|
|
|
|
@ -401,7 +403,7 @@ namespace ICSharpCode.ILSpy.AssemblyTree
@@ -401,7 +403,7 @@ namespace ICSharpCode.ILSpy.AssemblyTree
|
|
|
|
|
AssemblyList.Open(sessionSettings.ActiveAutoLoadedAssembly, true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Dispatcher.BeginInvoke(DispatcherPriority.Loaded, OpenAssemblies); |
|
|
|
|
UIThreadDispatcher.BeginInvoke(DispatcherPriority.Loaded, OpenAssemblies); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private async Task OpenAssemblies() |
|
|
|
|
@ -536,14 +538,14 @@ namespace ICSharpCode.ILSpy.AssemblyTree
@@ -536,14 +538,14 @@ namespace ICSharpCode.ILSpy.AssemblyTree
|
|
|
|
|
|
|
|
|
|
if (SelectedItem == node) |
|
|
|
|
{ |
|
|
|
|
Dispatcher.BeginInvoke(RefreshDecompiledView); |
|
|
|
|
UIThreadDispatcher.BeginInvoke(RefreshDecompiledView); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
activeView?.ScrollIntoView(node); |
|
|
|
|
SelectedItem = node; |
|
|
|
|
|
|
|
|
|
Dispatcher.BeginInvoke(DispatcherPriority.Background, () => { |
|
|
|
|
UIThreadDispatcher.BeginInvoke(DispatcherPriority.Background, () => { |
|
|
|
|
activeView?.ScrollIntoView(node); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
@ -795,7 +797,7 @@ namespace ICSharpCode.ILSpy.AssemblyTree
@@ -795,7 +797,7 @@ namespace ICSharpCode.ILSpy.AssemblyTree
|
|
|
|
|
{ |
|
|
|
|
ContextMenuProvider.ContextMenuClosed -= ContextMenuClosed; |
|
|
|
|
|
|
|
|
|
Dispatcher.BeginInvoke(DispatcherPriority.Background, () => { |
|
|
|
|
UIThreadDispatcher.BeginInvoke(DispatcherPriority.Background, () => { |
|
|
|
|
if (Mouse.RightButton != MouseButtonState.Pressed) |
|
|
|
|
{ |
|
|
|
|
RefreshDecompiledView(); |
|
|
|
|
|