From 729cc9da0c8caddc14bac7aea2f2f45a793c5346 Mon Sep 17 00:00:00 2001 From: Ed Harvey Date: Mon, 28 Nov 2011 14:33:54 +1100 Subject: [PATCH] Code Tidy : Remove redundant using statements --- ILSpy/AboutPage.cs | 2 -- ILSpy/AssemblyList.cs | 3 -- ILSpy/AvalonEdit/IconMarginActionsProvider.cs | 2 -- ILSpy/Bookmarks/MemberBookmark.cs | 5 ---- ILSpy/Controls/ExtensionMethods.cs | 2 -- ILSpy/Controls/ResourceStringTable.xaml.cs | 29 ++++++++++++------- ILSpy/CreateListDialog.xaml.cs | 10 ------- ILSpy/ExtensionMethods.cs | 3 -- ILSpy/FilterSettings.cs | 1 - ILSpy/GuessFileType.cs | 1 - ILSpy/ILSpySettings.cs | 3 +- ILSpy/NavigationHistory.cs | 2 -- ILSpy/Options/DecompilerSettingsPanel.xaml.cs | 7 ----- ILSpy/Options/DisplaySettingsPanel.xaml.cs | 5 ---- ILSpy/Options/OptionsDialog.xaml.cs | 6 ---- ILSpy/SearchPane.cs | 8 +---- ILSpy/TextView/AvalonEditTextOutput.cs | 2 -- .../Analyzer/AnalyzedEventFiredByTreeNode.cs | 1 - ...yzedInterfaceEventImplementedByTreeNode.cs | 1 - .../Analyzer/AnalyzedMethodUsedByTreeNode.cs | 1 - ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs | 2 -- ILSpy/TreeNodes/ReferenceFolderTreeNode.cs | 1 - ILSpy/TreeNodes/ResourceListTreeNode.cs | 10 ------- .../ResourceNodes/IResourceNodeFactory.cs | 1 - ILSpy/VB/VBTextOutputFormatter.cs | 2 -- 25 files changed, 20 insertions(+), 90 deletions(-) diff --git a/ILSpy/AboutPage.cs b/ILSpy/AboutPage.cs index 336e8aa49..8f5e66f8e 100644 --- a/ILSpy/AboutPage.cs +++ b/ILSpy/AboutPage.cs @@ -29,12 +29,10 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Input; -using System.Xml; using System.Xml.Linq; using ICSharpCode.AvalonEdit.Rendering; using ICSharpCode.Decompiler; -using ICSharpCode.ILSpy.Bookmarks; using ICSharpCode.ILSpy.TextView; namespace ICSharpCode.ILSpy diff --git a/ILSpy/AssemblyList.cs b/ILSpy/AssemblyList.cs index 7a1cd6bf8..a620408f0 100644 --- a/ILSpy/AssemblyList.cs +++ b/ILSpy/AssemblyList.cs @@ -17,7 +17,6 @@ // DEALINGS IN THE SOFTWARE. using System; -using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -26,8 +25,6 @@ using System.IO; using System.Linq; using System.Windows.Threading; using System.Xml.Linq; -using ICSharpCode.ILSpy.TreeNodes; -using Mono.Cecil; namespace ICSharpCode.ILSpy { diff --git a/ILSpy/AvalonEdit/IconMarginActionsProvider.cs b/ILSpy/AvalonEdit/IconMarginActionsProvider.cs index 6cb4d3c7d..a1fc5eb71 100644 --- a/ILSpy/AvalonEdit/IconMarginActionsProvider.cs +++ b/ILSpy/AvalonEdit/IconMarginActionsProvider.cs @@ -21,8 +21,6 @@ using System.ComponentModel.Composition; using System.Linq; using System.Windows.Controls; using System.Windows.Input; -using System.Windows.Media; - using ICSharpCode.ILSpy.Bookmarks; namespace ICSharpCode.ILSpy.AvalonEdit diff --git a/ILSpy/Bookmarks/MemberBookmark.cs b/ILSpy/Bookmarks/MemberBookmark.cs index 8de319a56..cfb5e950a 100644 --- a/ILSpy/Bookmarks/MemberBookmark.cs +++ b/ILSpy/Bookmarks/MemberBookmark.cs @@ -17,13 +17,8 @@ // DEALINGS IN THE SOFTWARE. using System; -using System.Windows; using System.Windows.Input; using System.Windows.Media; - -using ICSharpCode.Decompiler; -using ICSharpCode.NRefactory.CSharp; -using ICSharpCode.NRefactory.TypeSystem; using Mono.Cecil; namespace ICSharpCode.ILSpy.Bookmarks diff --git a/ILSpy/Controls/ExtensionMethods.cs b/ILSpy/Controls/ExtensionMethods.cs index b335f4449..6d4e91150 100644 --- a/ILSpy/Controls/ExtensionMethods.cs +++ b/ILSpy/Controls/ExtensionMethods.cs @@ -17,10 +17,8 @@ // DEALINGS IN THE SOFTWARE. using System; -using System.Collections.Generic; using System.Windows; using System.Windows.Markup; -using Mono.Cecil; namespace ICSharpCode.ILSpy.Controls { diff --git a/ILSpy/Controls/ResourceStringTable.xaml.cs b/ILSpy/Controls/ResourceStringTable.xaml.cs index 635cde341..9d48d2b86 100644 --- a/ILSpy/Controls/ResourceStringTable.xaml.cs +++ b/ILSpy/Controls/ResourceStringTable.xaml.cs @@ -1,20 +1,27 @@ -/* - * Created by SharpDevelop. - * User: Ronny Klier - * Date: 31.05.2011 - * Time: 00:13 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ +// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this +// software and associated documentation files (the "Software"), to deal in the Software +// without restriction, including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons +// to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or +// substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + using System; using System.Collections; using System.Text; using System.Windows; using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; using System.Windows.Input; -using System.Windows.Media; namespace ICSharpCode.ILSpy.Controls { diff --git a/ILSpy/CreateListDialog.xaml.cs b/ILSpy/CreateListDialog.xaml.cs index a0259828b..83c59b875 100644 --- a/ILSpy/CreateListDialog.xaml.cs +++ b/ILSpy/CreateListDialog.xaml.cs @@ -1,16 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Windows; using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; namespace ICSharpCode.ILSpy { diff --git a/ILSpy/ExtensionMethods.cs b/ILSpy/ExtensionMethods.cs index 29e0e8e69..7d14edc55 100644 --- a/ILSpy/ExtensionMethods.cs +++ b/ILSpy/ExtensionMethods.cs @@ -18,9 +18,6 @@ using System; using System.Collections.Generic; -using System.Windows; -using System.Windows.Markup; -using Mono.Cecil; namespace ICSharpCode.ILSpy { diff --git a/ILSpy/FilterSettings.cs b/ILSpy/FilterSettings.cs index 7efc4e54f..910568c8c 100644 --- a/ILSpy/FilterSettings.cs +++ b/ILSpy/FilterSettings.cs @@ -18,7 +18,6 @@ using System; using System.ComponentModel; -using System.Linq; using System.Xml.Linq; namespace ICSharpCode.ILSpy diff --git a/ILSpy/GuessFileType.cs b/ILSpy/GuessFileType.cs index 4299efa5e..2d1467861 100644 --- a/ILSpy/GuessFileType.cs +++ b/ILSpy/GuessFileType.cs @@ -20,7 +20,6 @@ using System; using System.IO; using System.Text; using System.Xml; -using ICSharpCode.AvalonEdit.Utils; namespace ICSharpCode.ILSpy { diff --git a/ILSpy/ILSpySettings.cs b/ILSpy/ILSpySettings.cs index 053bee7ce..859e46590 100644 --- a/ILSpy/ILSpySettings.cs +++ b/ILSpy/ILSpySettings.cs @@ -18,7 +18,6 @@ using System; using System.IO; -using System.Linq; using System.Text; using System.Threading; using System.Xml; @@ -135,7 +134,7 @@ namespace ICSharpCode.ILSpy /// sealed class MutexProtector : IDisposable { - Mutex mutex; + readonly Mutex mutex; public MutexProtector(string name) { diff --git a/ILSpy/NavigationHistory.cs b/ILSpy/NavigationHistory.cs index c5983a96d..976324e15 100644 --- a/ILSpy/NavigationHistory.cs +++ b/ILSpy/NavigationHistory.cs @@ -18,8 +18,6 @@ using System; using System.Collections.Generic; -using ICSharpCode.TreeView; -using System.Diagnostics; namespace ICSharpCode.ILSpy { diff --git a/ILSpy/Options/DecompilerSettingsPanel.xaml.cs b/ILSpy/Options/DecompilerSettingsPanel.xaml.cs index e32b22657..54a269b38 100644 --- a/ILSpy/Options/DecompilerSettingsPanel.xaml.cs +++ b/ILSpy/Options/DecompilerSettingsPanel.xaml.cs @@ -17,14 +17,7 @@ // DEALINGS IN THE SOFTWARE. using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; using System.Xml.Linq; using ICSharpCode.Decompiler; diff --git a/ILSpy/Options/DisplaySettingsPanel.xaml.cs b/ILSpy/Options/DisplaySettingsPanel.xaml.cs index 848f11555..20826b88f 100644 --- a/ILSpy/Options/DisplaySettingsPanel.xaml.cs +++ b/ILSpy/Options/DisplaySettingsPanel.xaml.cs @@ -17,19 +17,14 @@ // DEALINGS IN THE SOFTWARE. using System; -using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; using System.Windows.Media; using System.Windows.Threading; using System.Xml.Linq; -using ICSharpCode.Decompiler; namespace ICSharpCode.ILSpy.Options { diff --git a/ILSpy/Options/OptionsDialog.xaml.cs b/ILSpy/Options/OptionsDialog.xaml.cs index 72d1a9728..40043fac5 100644 --- a/ILSpy/Options/OptionsDialog.xaml.cs +++ b/ILSpy/Options/OptionsDialog.xaml.cs @@ -17,16 +17,10 @@ // DEALINGS IN THE SOFTWARE. using System; -using System.Collections.Generic; using System.ComponentModel.Composition; using System.Linq; -using System.Text; using System.Windows; using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; using System.Xml.Linq; namespace ICSharpCode.ILSpy.Options diff --git a/ILSpy/SearchPane.cs b/ILSpy/SearchPane.cs index 02d8024be..93edf5803 100644 --- a/ILSpy/SearchPane.cs +++ b/ILSpy/SearchPane.cs @@ -17,22 +17,16 @@ // DEALINGS IN THE SOFTWARE. using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; using System.IO; -using System.Linq; -using System.Text; using System.Threading; using System.Windows; using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Threading; -using ICSharpCode.Decompiler.ILAst; using ICSharpCode.ILSpy.TreeNodes; using ICSharpCode.NRefactory.CSharp; using ICSharpCode.NRefactory.Utils; @@ -192,7 +186,7 @@ namespace ICSharpCode.ILSpy readonly CancellationTokenSource cts = new CancellationTokenSource(); readonly LoadedAssembly[] assemblies; readonly string searchTerm; - int searchMode; + readonly int searchMode; readonly Language language; public readonly ObservableCollection Results = new ObservableCollection(); int resultCount; diff --git a/ILSpy/TextView/AvalonEditTextOutput.cs b/ILSpy/TextView/AvalonEditTextOutput.cs index 12ec58488..ce2debeeb 100644 --- a/ILSpy/TextView/AvalonEditTextOutput.cs +++ b/ILSpy/TextView/AvalonEditTextOutput.cs @@ -26,9 +26,7 @@ using System.Windows; using ICSharpCode.AvalonEdit.Document; using ICSharpCode.AvalonEdit.Folding; using ICSharpCode.AvalonEdit.Rendering; -using ICSharpCode.AvalonEdit.Utils; using ICSharpCode.Decompiler; -using Mono.Cecil; namespace ICSharpCode.ILSpy.TextView { diff --git a/ILSpy/TreeNodes/Analyzer/AnalyzedEventFiredByTreeNode.cs b/ILSpy/TreeNodes/Analyzer/AnalyzedEventFiredByTreeNode.cs index f2681ae8b..2d45bd4ac 100644 --- a/ILSpy/TreeNodes/Analyzer/AnalyzedEventFiredByTreeNode.cs +++ b/ILSpy/TreeNodes/Analyzer/AnalyzedEventFiredByTreeNode.cs @@ -21,7 +21,6 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Threading; -using ICSharpCode.TreeView; using Mono.Cecil; using Mono.Cecil.Cil; diff --git a/ILSpy/TreeNodes/Analyzer/AnalyzedInterfaceEventImplementedByTreeNode.cs b/ILSpy/TreeNodes/Analyzer/AnalyzedInterfaceEventImplementedByTreeNode.cs index 761b4fc3e..76113742f 100644 --- a/ILSpy/TreeNodes/Analyzer/AnalyzedInterfaceEventImplementedByTreeNode.cs +++ b/ILSpy/TreeNodes/Analyzer/AnalyzedInterfaceEventImplementedByTreeNode.cs @@ -21,7 +21,6 @@ using System.Collections.Generic; using System.Linq; using System.Threading; using ICSharpCode.Decompiler.Ast; -using ICSharpCode.TreeView; using Mono.Cecil; namespace ICSharpCode.ILSpy.TreeNodes.Analyzer diff --git a/ILSpy/TreeNodes/Analyzer/AnalyzedMethodUsedByTreeNode.cs b/ILSpy/TreeNodes/Analyzer/AnalyzedMethodUsedByTreeNode.cs index 989de1cab..b50cfa32b 100644 --- a/ILSpy/TreeNodes/Analyzer/AnalyzedMethodUsedByTreeNode.cs +++ b/ILSpy/TreeNodes/Analyzer/AnalyzedMethodUsedByTreeNode.cs @@ -21,7 +21,6 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Threading; -using ICSharpCode.TreeView; using Mono.Cecil; using Mono.Cecil.Cil; diff --git a/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs b/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs index d9d33b755..f84a47323 100644 --- a/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs +++ b/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs @@ -17,9 +17,7 @@ // DEALINGS IN THE SOFTWARE. using System; -using System.Linq; using ICSharpCode.Decompiler; -using ICSharpCode.TreeView; using Mono.Cecil; namespace ICSharpCode.ILSpy.TreeNodes diff --git a/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs b/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs index 8a013a13c..38c5bb29c 100644 --- a/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs +++ b/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs @@ -19,7 +19,6 @@ using System; using System.Windows.Threading; using ICSharpCode.Decompiler; -using ICSharpCode.TreeView; using Mono.Cecil; namespace ICSharpCode.ILSpy.TreeNodes diff --git a/ILSpy/TreeNodes/ResourceListTreeNode.cs b/ILSpy/TreeNodes/ResourceListTreeNode.cs index c77eb472e..74b776d45 100644 --- a/ILSpy/TreeNodes/ResourceListTreeNode.cs +++ b/ILSpy/TreeNodes/ResourceListTreeNode.cs @@ -17,19 +17,9 @@ // DEALINGS IN THE SOFTWARE. using System; -using System.Collections; -using System.IO; using System.Linq; -using System.Resources; -using System.Text; -using System.Windows; using System.Windows.Threading; - -using ICSharpCode.AvalonEdit.Highlighting; -using ICSharpCode.AvalonEdit.Utils; using ICSharpCode.Decompiler; -using ICSharpCode.ILSpy.TextView; -using Microsoft.Win32; using Mono.Cecil; namespace ICSharpCode.ILSpy.TreeNodes diff --git a/ILSpy/TreeNodes/ResourceNodes/IResourceNodeFactory.cs b/ILSpy/TreeNodes/ResourceNodes/IResourceNodeFactory.cs index c19cbfeda..12f17ae27 100644 --- a/ILSpy/TreeNodes/ResourceNodes/IResourceNodeFactory.cs +++ b/ILSpy/TreeNodes/ResourceNodes/IResourceNodeFactory.cs @@ -17,7 +17,6 @@ // DEALINGS IN THE SOFTWARE. using System; -using System.IO; using Mono.Cecil; namespace ICSharpCode.ILSpy.TreeNodes diff --git a/ILSpy/VB/VBTextOutputFormatter.cs b/ILSpy/VB/VBTextOutputFormatter.cs index b00d20dfa..38f89d7ef 100644 --- a/ILSpy/VB/VBTextOutputFormatter.cs +++ b/ILSpy/VB/VBTextOutputFormatter.cs @@ -18,8 +18,6 @@ using System; using System.Collections.Generic; -using System.Linq; - using ICSharpCode.Decompiler; using ICSharpCode.Decompiler.ILAst; using ICSharpCode.NRefactory.VB;