Browse Source

fix build errors from merge

pull/3287/head
apmoskevitz 10 months ago
parent
commit
6312e594a7
  1. 8
      ILSpy/App.xaml.cs
  2. 52
      ILSpy/AssemblyTree/AssemblyTreeModel.cs
  3. 2
      ILSpy/ContextMenuEntry.cs
  4. 2
      ILSpy/Docking/DockWorkspace.cs
  5. 1
      ILSpy/MainWindow.xaml.cs
  6. 4
      ILSpy/Options/DisplaySettingsPanel.xaml.cs
  7. 2
      ILSpy/Options/OptionsDialog.xaml.cs
  8. 6
      ILSpy/SessionSettings.cs
  9. 4
      ILSpy/Views/DebugSteps.xaml.cs

8
ILSpy/App.xaml.cs

@ -18,13 +18,14 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.Composition.Hosting;
using System.Diagnostics; using System.Diagnostics;
using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Runtime.Loader; using System.Runtime.Loader;
using System.Text; using System.Text;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows; using System.Windows;
using System.Windows.Documents; using System.Windows.Documents;
@ -33,8 +34,8 @@ using System.Windows.Threading;
using ICSharpCode.ILSpy.AppEnv; using ICSharpCode.ILSpy.AppEnv;
using ICSharpCode.ILSpy.AssemblyTree; using ICSharpCode.ILSpy.AssemblyTree;
using ICSharpCode.ILSpy.Themes;
using ICSharpCode.ILSpyX.Analyzers; using ICSharpCode.ILSpyX.Analyzers;
using ICSharpCode.ILSpyX.Settings;
using ICSharpCode.ILSpyX.TreeView; using ICSharpCode.ILSpyX.TreeView;
using Medo.Application; using Medo.Application;
@ -43,9 +44,6 @@ using Microsoft.VisualStudio.Composition;
using TomsToolbox.Composition; using TomsToolbox.Composition;
using TomsToolbox.Wpf.Composition; using TomsToolbox.Wpf.Composition;
using ICSharpCode.ILSpy.Themes;
using System.Globalization;
using System.Threading;
using TomsToolbox.Wpf.Styles; using TomsToolbox.Wpf.Styles;
namespace ICSharpCode.ILSpy namespace ICSharpCode.ILSpy

52
ILSpy/AssemblyTree/AssemblyTreeModel.cs

@ -16,40 +16,38 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
using System.Collections.Generic;
using System; using System;
using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.ComponentModel.Composition; using System.ComponentModel.Composition;
using System.IO; using System.IO;
using System.Linq;
using System.Reflection.Metadata;
using System.Reflection.Metadata.Ecma335;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Navigation;
using System.Windows.Threading; using System.Windows.Threading;
using ICSharpCode.Decompiler;
using ICSharpCode.Decompiler.Documentation;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem; using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.Decompiler.TypeSystem.Implementation;
using ICSharpCode.ILSpy.AppEnv;
using ICSharpCode.ILSpy.Docking; using ICSharpCode.ILSpy.Docking;
using ICSharpCode.ILSpy.Properties; using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.Search;
using ICSharpCode.ILSpy.TextView; using ICSharpCode.ILSpy.TextView;
using ICSharpCode.ILSpy.TreeNodes; using ICSharpCode.ILSpy.TreeNodes;
using ICSharpCode.ILSpy.ViewModels; using ICSharpCode.ILSpy.ViewModels;
using ICSharpCode.ILSpyX; using ICSharpCode.ILSpyX;
using ICSharpCode.ILSpyX.Settings; using ICSharpCode.ILSpyX.Settings;
using ICSharpCode.ILSpyX.TreeView; using ICSharpCode.ILSpyX.TreeView;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Linq;
using ICSharpCode.Decompiler.Metadata;
using System.Reflection.Metadata.Ecma335;
using System.Windows;
using ICSharpCode.Decompiler.Documentation;
using ICSharpCode.Decompiler.TypeSystem.Implementation;
using System.Reflection.Metadata;
using System.Text;
using System.Windows.Navigation;
using ICSharpCode.ILSpy.AppEnv;
using ICSharpCode.ILSpy.Search;
using ICSharpCode.Decompiler;
using TomsToolbox.Essentials; using TomsToolbox.Essentials;
using TomsToolbox.Wpf; using TomsToolbox.Wpf;
@ -121,8 +119,8 @@ namespace ICSharpCode.ILSpy.AssemblyTree
set => SetProperty(ref root, value); set => SetProperty(ref root, value);
} }
private SharpTreeNode selectedItem; private SharpTreeNode? selectedItem;
public SharpTreeNode SelectedItem { public SharpTreeNode? SelectedItem {
get => selectedItem; get => selectedItem;
set => SetProperty(ref selectedItem, value); set => SetProperty(ref selectedItem, value);
} }
@ -145,7 +143,7 @@ namespace ICSharpCode.ILSpy.AssemblyTree
/// Called on startup or when passed arguments via WndProc from a second instance. /// Called on startup or when passed arguments via WndProc from a second instance.
/// In the format case, spySettings is non-null; in the latter it is null. /// In the format case, spySettings is non-null; in the latter it is null.
/// </summary> /// </summary>
public void HandleCommandLineArgumentsAfterShowList(CommandLineArguments args, ISettingsProvider spySettings = null) public void HandleCommandLineArgumentsAfterShowList(CommandLineArguments args, ISettingsProvider? spySettings = null)
{ {
var sessionSettings = SettingsService.Instance.SessionSettings; var sessionSettings = SettingsService.Instance.SessionSettings;
@ -432,7 +430,7 @@ namespace ICSharpCode.ILSpy.AssemblyTree
#endif #endif
} }
void assemblyList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) void assemblyList_CollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
{ {
if (e.Action == NotifyCollectionChangedAction.Reset) if (e.Action == NotifyCollectionChangedAction.Reset)
{ {
@ -595,7 +593,7 @@ namespace ICSharpCode.ILSpy.AssemblyTree
} }
} }
private void JumpToReference(object sender, NavigateToReferenceEventArgs e) private void JumpToReference(object? sender, NavigateToReferenceEventArgs e)
{ {
JumpToReferenceAsync(e.Reference, e.InNewTabPage).HandleExceptions(); JumpToReferenceAsync(e.Reference, e.InNewTabPage).HandleExceptions();
} }
@ -655,11 +653,11 @@ namespace ICSharpCode.ILSpy.AssemblyTree
#endregion #endregion
public void LoadAssemblies(IEnumerable<string> fileNames, List<LoadedAssembly> loadedAssemblies = null, bool focusNode = true) public void LoadAssemblies(IEnumerable<string> fileNames, List<LoadedAssembly>? loadedAssemblies = null, bool focusNode = true)
{ {
using (Keyboard.FocusedElement.PreserveFocus(!focusNode)) using (Keyboard.FocusedElement.PreserveFocus(!focusNode))
{ {
AssemblyTreeNode lastNode = null; AssemblyTreeNode? lastNode = null;
foreach (string file in fileNames) foreach (string file in fileNames)
{ {
@ -717,7 +715,7 @@ namespace ICSharpCode.ILSpy.AssemblyTree
return; return;
void ContextMenuClosed(object sender, EventArgs e) void ContextMenuClosed(object? sender, EventArgs e)
{ {
ContextMenuProvider.ContextMenuClosed -= ContextMenuClosed; ContextMenuProvider.ContextMenuClosed -= ContextMenuClosed;
@ -730,7 +728,7 @@ namespace ICSharpCode.ILSpy.AssemblyTree
} }
} }
private void DecompileSelectedNodes(DecompilerTextViewState newState = null) private void DecompileSelectedNodes(DecompilerTextViewState? newState = null)
{ {
var activeTabPage = DockWorkspace.Instance.ActiveTabPage; var activeTabPage = DockWorkspace.Instance.ActiveTabPage;
@ -882,7 +880,7 @@ namespace ICSharpCode.ILSpy.AssemblyTree
private class AssemblyComparer : IComparer<LoadedAssembly> private class AssemblyComparer : IComparer<LoadedAssembly>
{ {
public static readonly AssemblyComparer Instance = new(); public static readonly AssemblyComparer Instance = new();
int IComparer<LoadedAssembly>.Compare(LoadedAssembly x, LoadedAssembly y) int IComparer<LoadedAssembly>.Compare(LoadedAssembly? x, LoadedAssembly? y)
{ {
return string.Compare(x?.ShortName, y?.ShortName, StringComparison.CurrentCulture); return string.Compare(x?.ShortName, y?.ShortName, StringComparison.CurrentCulture);
} }

2
ILSpy/ContextMenuEntry.cs

@ -90,7 +90,7 @@ namespace ICSharpCode.ILSpy
/// </summary> /// </summary>
public DependencyObject OriginalSource { get; private set; } public DependencyObject OriginalSource { get; private set; }
public static TextViewContext Create(ContextMenuEventArgs eventArgs, SharpTreeView?? treeView = null, DecompilerTextView textView = null, ListBox? listBox = null, DataGrid? dataGrid = null) public static TextViewContext Create(ContextMenuEventArgs eventArgs, SharpTreeView? treeView = null, DecompilerTextView? textView = null, ListBox? listBox = null, DataGrid? dataGrid = null)
{ {
ReferenceSegment? reference; ReferenceSegment? reference;

2
ILSpy/Docking/DockWorkspace.cs

@ -110,7 +110,7 @@ namespace ICSharpCode.ILSpy.Docking
} }
} }
public void AddTabPage(TabPageModel tabPage = null) public void AddTabPage(TabPageModel? tabPage = null)
{ {
tabPages.Add(tabPage ?? new TabPageModel()); tabPages.Add(tabPage ?? new TabPageModel());
} }

1
ILSpy/MainWindow.xaml.cs

@ -29,7 +29,6 @@ using System.Windows.Media;
using AvalonDock.Layout.Serialization; using AvalonDock.Layout.Serialization;
using ICSharpCode.ILSpy.AssemblyTree; using ICSharpCode.ILSpy.AssemblyTree;
using ICSharpCode.ILSpy.Docking;
using ICSharpCode.ILSpy.TreeNodes; using ICSharpCode.ILSpy.TreeNodes;
using ICSharpCode.ILSpy.Updates; using ICSharpCode.ILSpy.Updates;
using ICSharpCode.ILSpyX.FileLoaders; using ICSharpCode.ILSpyX.FileLoaders;

4
ILSpy/Options/DisplaySettingsPanel.xaml.cs

@ -69,7 +69,7 @@ namespace ICSharpCode.ILSpy.Options
public sealed class FontSizeConverter : ValueConverter public sealed class FontSizeConverter : ValueConverter
{ {
protected override object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) protected override object Convert(object value, Type? targetType, object? parameter, System.Globalization.CultureInfo? culture)
{ {
if (value is double d) if (value is double d)
{ {
@ -79,7 +79,7 @@ namespace ICSharpCode.ILSpy.Options
return DependencyProperty.UnsetValue; return DependencyProperty.UnsetValue;
} }
protected override object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) protected override object ConvertBack(object value, Type? targetType, object? parameter, System.Globalization.CultureInfo? culture)
{ {
if (value is not string s) if (value is not string s)
return DependencyProperty.UnsetValue; return DependencyProperty.UnsetValue;

2
ILSpy/Options/OptionsDialog.xaml.cs

@ -69,7 +69,7 @@ namespace ICSharpCode.ILSpy.Options
this.assemblyTreeModel = assemblyTreeModel; this.assemblyTreeModel = assemblyTreeModel;
} }
public override void Execute(object parameter) public override void Execute(object? parameter)
{ {
OptionsDialog dlg = new() { OptionsDialog dlg = new() {
Owner = MainWindow.Instance, Owner = MainWindow.Instance,

6
ILSpy/SessionSettings.cs

@ -180,14 +180,14 @@ namespace ICSharpCode.ILSpy
return c.ConvertToInvariantString(obj); return c.ConvertToInvariantString(obj);
} }
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler? PropertyChanged;
private void OnPropertyChanged([CallerMemberName] string propertyName = null) private void OnPropertyChanged([CallerMemberName] string? propertyName = null)
{ {
PropertyChanged?.Invoke(this, new(propertyName)); PropertyChanged?.Invoke(this, new(propertyName));
} }
private bool SetProperty<T>(ref T field, T value, [CallerMemberName] string propertyName = null) private bool SetProperty<T>(ref T field, T value, [CallerMemberName] string? propertyName = null)
{ {
if (EqualityComparer<T>.Default.Equals(field, value)) if (EqualityComparer<T>.Default.Equals(field, value))
return false; return false;

4
ILSpy/Views/DebugSteps.xaml.cs

@ -52,7 +52,7 @@ namespace ICSharpCode.ILSpy
DecompileAsync(lastSelectedStep); DecompileAsync(lastSelectedStep);
} }
private void SelectionChanged(object sender, EventArgs e) private void SelectionChanged(object? sender, EventArgs e)
{ {
Dispatcher.Invoke(() => { Dispatcher.Invoke(() => {
tree.ItemsSource = null; tree.ItemsSource = null;
@ -60,7 +60,7 @@ namespace ICSharpCode.ILSpy
}); });
} }
private void Settings_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) private void Settings_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
{ {
#if DEBUG #if DEBUG
if (sender is not LanguageSettings) if (sender is not LanguageSettings)

Loading…
Cancel
Save