From d5830147fdf155a16cc17de099c874deae7dac49 Mon Sep 17 00:00:00 2001 From: Lex Li Date: Wed, 31 Dec 2025 03:50:58 -0500 Subject: [PATCH] Fix whitespace --- ILSpy/AssemblyTree/AssemblyTreeModel.cs | 12 ++++++------ ILSpy/Metadata/Helper.wpf.cs | 6 +++--- ILSpy/Metadata/Helpers.cs | 16 ++++++++-------- ILSpy/Metadata/HexFilterControl.ContentFilter.cs | 2 +- ILSpy/Metadata/MetadataTableTreeNode.wpf.cs | 6 +++--- ILSpy/Options/ShowOptionsCommand.cs | 6 +++--- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ILSpy/AssemblyTree/AssemblyTreeModel.cs b/ILSpy/AssemblyTree/AssemblyTreeModel.cs index 778d73ec3..0d22f9b28 100644 --- a/ILSpy/AssemblyTree/AssemblyTreeModel.cs +++ b/ILSpy/AssemblyTree/AssemblyTreeModel.cs @@ -130,9 +130,9 @@ namespace ICSharpCode.ILSpy.AssemblyTree var oldSelection = selectedItems; selectedItems = value; OnPropertyChanged(); - #if CROSS_PLATFORM +#if CROSS_PLATFORM OnPropertyChanged(nameof(SelectedItem)); - #endif +#endif TreeView_SelectionChanged(oldSelection, selectedItems); } } @@ -496,16 +496,16 @@ namespace ICSharpCode.ILSpy.AssemblyTree } else { - #if CROSS_PLATFORM +#if CROSS_PLATFORM ExpandAncestors(node); - #endif +#endif activeView?.ScrollIntoView(node); SelectedItem = node; UIThreadDispatcher.BeginInvoke(DispatcherPriority.Background, () => { - #if CROSS_PLATFORM +#if CROSS_PLATFORM SelectedItem = node; - #endif +#endif activeView?.ScrollIntoView(node); }); } diff --git a/ILSpy/Metadata/Helper.wpf.cs b/ILSpy/Metadata/Helper.wpf.cs index ffa67ed0c..c099ce59b 100644 --- a/ILSpy/Metadata/Helper.wpf.cs +++ b/ILSpy/Metadata/Helper.wpf.cs @@ -8,8 +8,8 @@ using System.Windows.Documents; namespace ICSharpCode.ILSpy.Metadata { - static partial class Helpers - { + static partial class Helpers + { private static DataTemplate GetOrCreateLinkCellTemplate(string name, PropertyDescriptor descriptor, Binding binding) { if (linkCellTemplates.TryGetValue(name, out var template)) @@ -39,5 +39,5 @@ namespace ICSharpCode.ILSpy.Metadata } } } - } + } } \ No newline at end of file diff --git a/ILSpy/Metadata/Helpers.cs b/ILSpy/Metadata/Helpers.cs index 65ffb6f58..bada8bc47 100644 --- a/ILSpy/Metadata/Helpers.cs +++ b/ILSpy/Metadata/Helpers.cs @@ -71,9 +71,9 @@ namespace ICSharpCode.ILSpy.Metadata ContextMenuProvider.Add(view); DataGridFilter.SetIsAutoFilterEnabled(view, true); DataGridFilter.SetContentFilterFactory(view, new RegexContentFilterFactory()); - #if !CROSS_PLATFORM +#if !CROSS_PLATFORM AdvancedScrollWheelBehavior.SetAttach(view, AdvancedScrollWheelMode.WithoutAnimation); - #endif +#endif } DataGridFilter.GetFilter(view).Clear(); view.RowDetailsTemplateSelector = null; @@ -112,23 +112,23 @@ namespace ICSharpCode.ILSpy.Metadata case "RVA": case "StartOffset": case "Length": - #if CROSS_PLATFORM +#if CROSS_PLATFORM binding.Converter = HexFormatConverter.Instance; - #else +#else binding.StringFormat = "X8"; - #endif +#endif e.Column.SetTemplate((ControlTemplate)MetadataTableViews.Instance["HexFilter"]); break; case "RowDetails": e.Cancel = true; break; case "Value" when e.PropertyDescriptor is PropertyDescriptor dp && dp.ComponentType == typeof(Entry): - #if CROSS_PLATFORM +#if CROSS_PLATFORM binding.Path = "."; e.Column.SetTemplate((ControlTemplate)MetadataTableViews.Instance["DefaultFilter"]); - #else +#else binding.Path = new PropertyPath("."); - #endif +#endif binding.Converter = ByteWidthConverter.Instance; break; default: diff --git a/ILSpy/Metadata/HexFilterControl.ContentFilter.cs b/ILSpy/Metadata/HexFilterControl.ContentFilter.cs index c8f6b1a8b..5a769ec5b 100644 --- a/ILSpy/Metadata/HexFilterControl.ContentFilter.cs +++ b/ILSpy/Metadata/HexFilterControl.ContentFilter.cs @@ -4,7 +4,7 @@ using DataGridExtensions; namespace ICSharpCode.ILSpy.Metadata { - public partial class HexFilterControl + public partial class HexFilterControl { class ContentFilter : IContentFilter { diff --git a/ILSpy/Metadata/MetadataTableTreeNode.wpf.cs b/ILSpy/Metadata/MetadataTableTreeNode.wpf.cs index ecb646bec..67fc16ad5 100644 --- a/ILSpy/Metadata/MetadataTableTreeNode.wpf.cs +++ b/ILSpy/Metadata/MetadataTableTreeNode.wpf.cs @@ -3,8 +3,8 @@ using System.Windows.Threading; namespace ICSharpCode.ILSpy.Metadata { - partial class MetadataTableTreeNode - { + partial class MetadataTableTreeNode + { protected void ScrollRowIntoView(DataGrid view, int row) { @@ -28,5 +28,5 @@ namespace ICSharpCode.ILSpy.Metadata view.Loaded -= View_Loaded; this.scrollTarget = default; } - } + } } \ No newline at end of file diff --git a/ILSpy/Options/ShowOptionsCommand.cs b/ILSpy/Options/ShowOptionsCommand.cs index 50e173430..858bdcafd 100644 --- a/ILSpy/Options/ShowOptionsCommand.cs +++ b/ILSpy/Options/ShowOptionsCommand.cs @@ -32,7 +32,7 @@ namespace ICSharpCode.ILSpy.Options { OptionsDialog dlg = new(settingsService); - #if CROSS_PLATFORM +#if CROSS_PLATFORM // On cross-platform schedule showing the dialog on the UI dispatcher // and await its result asynchronously. Do not block the calling thread. System.Windows.Threading.Dispatcher.CurrentDispatcher.BeginInvoke(async () => { @@ -42,7 +42,7 @@ namespace ICSharpCode.ILSpy.Options System.Windows.Threading.Dispatcher.CurrentDispatcher.BeginInvoke(() => assemblyTreeModel.Refresh()); } }); - #else +#else // WPF path: set owner and show dialog synchronously as before. dlg.Owner = mainWindow; bool? result = dlg.ShowDialog(); @@ -50,7 +50,7 @@ namespace ICSharpCode.ILSpy.Options { assemblyTreeModel.Refresh(); } - #endif +#endif } } } \ No newline at end of file