diff --git a/Directory.Packages.props b/Directory.Packages.props
index 2492143b7c..b77822de6b 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -35,6 +35,7 @@
+
diff --git a/ICSharpCode.ILSpyX/Abstractions/ILanguage.cs b/ICSharpCode.ILSpyX/Abstractions/ILanguage.cs
index 1947b0cc3f..993e37ba8f 100644
--- a/ICSharpCode.ILSpyX/Abstractions/ILanguage.cs
+++ b/ICSharpCode.ILSpyX/Abstractions/ILanguage.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+using System.Reflection.Metadata;
+
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
@@ -24,6 +26,7 @@ namespace ICSharpCode.ILSpyX.Abstractions
public interface ILanguage
{
bool ShowMember(IEntity member);
+ CodeMappingInfo GetCodeMappingInfo(PEFile module, EntityHandle member);
string GetEntityName(PEFile module, System.Reflection.Metadata.EntityHandle handle, bool fullName, bool omitGenerics);
string GetTooltip(IEntity entity);
diff --git a/ILSpy/Analyzers/AnalyzerContext.cs b/ICSharpCode.ILSpyX/Analyzers/AnalyzerContext.cs
similarity index 95%
rename from ILSpy/Analyzers/AnalyzerContext.cs
rename to ICSharpCode.ILSpyX/Analyzers/AnalyzerContext.cs
index 2e36571032..1e89b5d7e3 100644
--- a/ILSpy/Analyzers/AnalyzerContext.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/AnalyzerContext.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System;
using System.Collections.Concurrent;
using System.Reflection.Metadata;
@@ -24,8 +26,9 @@
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.ILSpyX;
+using ICSharpCode.ILSpyX.Abstractions;
-namespace ICSharpCode.ILSpy.Analyzers
+namespace ICSharpCode.ILSpyX.Analyzers
{
///
/// Provides additional context for analyzers.
@@ -42,7 +45,7 @@ public class AnalyzerContext
///
/// Currently used language.
///
- public Language Language { get; internal set; }
+ public ILanguage Language { get; internal set; }
///
/// Allows the analyzer to control whether the tree nodes will be sorted.
diff --git a/ILSpy/Analyzers/AnalyzerHelpers.cs b/ICSharpCode.ILSpyX/Analyzers/AnalyzerHelpers.cs
similarity index 98%
rename from ILSpy/Analyzers/AnalyzerHelpers.cs
rename to ICSharpCode.ILSpyX/Analyzers/AnalyzerHelpers.cs
index 9126dd6151..5836d5e6f9 100644
--- a/ILSpy/Analyzers/AnalyzerHelpers.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/AnalyzerHelpers.cs
@@ -16,12 +16,14 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System.Reflection.Metadata;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers
+namespace ICSharpCode.ILSpyX.Analyzers
{
internal static class AnalyzerHelpers
{
diff --git a/ILSpy/Analyzers/AnalyzerScope.cs b/ICSharpCode.ILSpyX/Analyzers/AnalyzerScope.cs
similarity index 99%
rename from ILSpy/Analyzers/AnalyzerScope.cs
rename to ICSharpCode.ILSpyX/Analyzers/AnalyzerScope.cs
index 881fc6e98f..a0fae5cb82 100644
--- a/ILSpy/Analyzers/AnalyzerScope.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/AnalyzerScope.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata;
@@ -26,7 +28,7 @@
using ICSharpCode.Decompiler.Util;
using ICSharpCode.ILSpyX;
-namespace ICSharpCode.ILSpy.Analyzers
+namespace ICSharpCode.ILSpyX.Analyzers
{
using ICSharpCode.Decompiler.TypeSystem;
diff --git a/ILSpy/Analyzers/Builtin/AttributeAppliedToAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/AttributeAppliedToAnalyzer.cs
similarity index 99%
rename from ILSpy/Analyzers/Builtin/AttributeAppliedToAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/AttributeAppliedToAnalyzer.cs
index 6007253a60..fa925c9b43 100644
--- a/ILSpy/Analyzers/Builtin/AttributeAppliedToAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/AttributeAppliedToAnalyzer.cs
@@ -26,7 +26,7 @@
using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.Decompiler.Util;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
[ExportAnalyzer(Header = "Applied To", Order = 10)]
class AttributeAppliedToAnalyzer : IAnalyzer
diff --git a/ILSpy/Analyzers/Builtin/EventImplementedByAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/EventImplementedByAnalyzer.cs
similarity index 97%
rename from ILSpy/Analyzers/Builtin/EventImplementedByAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/EventImplementedByAnalyzer.cs
index 4e87a0f30d..f76cac9058 100644
--- a/ILSpy/Analyzers/Builtin/EventImplementedByAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/EventImplementedByAnalyzer.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Diagnostics;
@@ -23,7 +25,7 @@
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
///
/// Shows events that implement an interface event.
diff --git a/ILSpy/Analyzers/Builtin/EventOverriddenByAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/EventOverriddenByAnalyzer.cs
similarity index 97%
rename from ILSpy/Analyzers/Builtin/EventOverriddenByAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/EventOverriddenByAnalyzer.cs
index f6c41dc184..199bcdb366 100644
--- a/ILSpy/Analyzers/Builtin/EventOverriddenByAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/EventOverriddenByAnalyzer.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Diagnostics;
@@ -23,7 +25,7 @@
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
///
/// Shows events that override an event.
diff --git a/ILSpy/Analyzers/Builtin/FieldAccessAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/FieldAccessAnalyzer.cs
similarity index 98%
rename from ILSpy/Analyzers/Builtin/FieldAccessAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/FieldAccessAnalyzer.cs
index 38228bc721..f033ce5627 100644
--- a/ILSpy/Analyzers/Builtin/FieldAccessAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/FieldAccessAnalyzer.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System;
using System.Collections;
using System.Collections.Generic;
@@ -30,11 +32,10 @@
using ICSharpCode.Decompiler.Disassembler;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
-using ICSharpCode.ILSpy.Analyzers;
using ILOpCode = System.Reflection.Metadata.ILOpCode;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
///
/// Finds methods where this field is read.
diff --git a/ILSpy/Analyzers/Builtin/FindTypeInAttributeDecoder.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/FindTypeInAttributeDecoder.cs
similarity index 99%
rename from ILSpy/Analyzers/Builtin/FindTypeInAttributeDecoder.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/FindTypeInAttributeDecoder.cs
index 1431e3cee3..796ef46746 100644
--- a/ILSpy/Analyzers/Builtin/FindTypeInAttributeDecoder.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/FindTypeInAttributeDecoder.cs
@@ -25,7 +25,7 @@
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
public enum TokenSearchResult : byte
{
diff --git a/ILSpy/Analyzers/Builtin/MemberImplementsInterfaceAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/MemberImplementsInterfaceAnalyzer.cs
similarity index 97%
rename from ILSpy/Analyzers/Builtin/MemberImplementsInterfaceAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/MemberImplementsInterfaceAnalyzer.cs
index d4c87ced58..307c6bb753 100644
--- a/ILSpy/Analyzers/Builtin/MemberImplementsInterfaceAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/MemberImplementsInterfaceAnalyzer.cs
@@ -16,13 +16,15 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
///
/// Shows members from all corresponding interfaces the selected member implements.
diff --git a/ILSpy/Analyzers/Builtin/MethodImplementedByAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/MethodImplementedByAnalyzer.cs
similarity index 97%
rename from ILSpy/Analyzers/Builtin/MethodImplementedByAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/MethodImplementedByAnalyzer.cs
index db9073e2a7..03273353b4 100644
--- a/ILSpy/Analyzers/Builtin/MethodImplementedByAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/MethodImplementedByAnalyzer.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
@@ -26,7 +28,7 @@
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
///
/// Shows methods that implement an interface method.
diff --git a/ILSpy/Analyzers/Builtin/MethodOverriddenByAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/MethodOverriddenByAnalyzer.cs
similarity index 97%
rename from ILSpy/Analyzers/Builtin/MethodOverriddenByAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/MethodOverriddenByAnalyzer.cs
index 7a90f48fa6..81a550820d 100644
--- a/ILSpy/Analyzers/Builtin/MethodOverriddenByAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/MethodOverriddenByAnalyzer.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Diagnostics;
@@ -23,7 +25,7 @@
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
///
/// Shows methods that override a method.
diff --git a/ILSpy/Analyzers/Builtin/MethodUsedByAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/MethodUsedByAnalyzer.cs
similarity index 98%
rename from ILSpy/Analyzers/Builtin/MethodUsedByAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/MethodUsedByAnalyzer.cs
index a2b698080b..ca4217dad9 100644
--- a/ILSpy/Analyzers/Builtin/MethodUsedByAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/MethodUsedByAnalyzer.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
@@ -28,7 +30,7 @@
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
///
/// Shows entities that are used by a method.
diff --git a/ILSpy/Analyzers/Builtin/MethodUsesAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/MethodUsesAnalyzer.cs
similarity index 98%
rename from ILSpy/Analyzers/Builtin/MethodUsesAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/MethodUsesAnalyzer.cs
index c3e8924199..4fe776d8ef 100644
--- a/ILSpy/Analyzers/Builtin/MethodUsesAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/MethodUsesAnalyzer.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System;
using System.Collections.Generic;
using System.Linq;
@@ -26,7 +28,7 @@
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
///
/// Shows entities that are used by a method.
diff --git a/ILSpy/Analyzers/Builtin/MethodVirtualUsedByAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/MethodVirtualUsedByAnalyzer.cs
similarity index 98%
rename from ILSpy/Analyzers/Builtin/MethodVirtualUsedByAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/MethodVirtualUsedByAnalyzer.cs
index bf806416c2..05ab6bd428 100644
--- a/ILSpy/Analyzers/Builtin/MethodVirtualUsedByAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/MethodVirtualUsedByAnalyzer.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
@@ -25,7 +27,7 @@
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
///
/// Shows entities that are used by a method.
diff --git a/ILSpy/Analyzers/Builtin/PropertyImplementedByAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/PropertyImplementedByAnalyzer.cs
similarity index 97%
rename from ILSpy/Analyzers/Builtin/PropertyImplementedByAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/PropertyImplementedByAnalyzer.cs
index 2b8cb8f845..15a505daeb 100644
--- a/ILSpy/Analyzers/Builtin/PropertyImplementedByAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/PropertyImplementedByAnalyzer.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Diagnostics;
@@ -23,7 +25,7 @@
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
///
/// Shows properties that implement an interface property.
diff --git a/ILSpy/Analyzers/Builtin/PropertyOverriddenByAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/PropertyOverriddenByAnalyzer.cs
similarity index 97%
rename from ILSpy/Analyzers/Builtin/PropertyOverriddenByAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/PropertyOverriddenByAnalyzer.cs
index 7ec8b5cee5..66752a2ecd 100644
--- a/ILSpy/Analyzers/Builtin/PropertyOverriddenByAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/PropertyOverriddenByAnalyzer.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
@@ -26,7 +28,7 @@
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
///
/// Shows properties that override a property.
diff --git a/ILSpy/Analyzers/Builtin/TypeExposedByAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/TypeExposedByAnalyzer.cs
similarity index 98%
rename from ILSpy/Analyzers/Builtin/TypeExposedByAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/TypeExposedByAnalyzer.cs
index 2b91096385..a41174a014 100644
--- a/ILSpy/Analyzers/Builtin/TypeExposedByAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/TypeExposedByAnalyzer.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
@@ -25,7 +27,7 @@
using System.Threading.Tasks;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
using ICSharpCode.Decompiler.TypeSystem;
diff --git a/ILSpy/Analyzers/Builtin/TypeExtensionMethodsAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/TypeExtensionMethodsAnalyzer.cs
similarity index 52%
rename from ILSpy/Analyzers/Builtin/TypeExtensionMethodsAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/TypeExtensionMethodsAnalyzer.cs
index 4d1d5bc301..80555eff2b 100644
--- a/ILSpy/Analyzers/Builtin/TypeExtensionMethodsAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/TypeExtensionMethodsAnalyzer.cs
@@ -1,10 +1,30 @@
-using System.Collections.Generic;
+// Copyright (c) 2018 Siegfried Pammer
+//
+// 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.
+
+#nullable disable
+
+using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Diagnostics;
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
///
/// Finds all extension methods defined for a type.
diff --git a/ILSpy/Analyzers/Builtin/TypeInstantiatedByAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/TypeInstantiatedByAnalyzer.cs
similarity index 98%
rename from ILSpy/Analyzers/Builtin/TypeInstantiatedByAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/TypeInstantiatedByAnalyzer.cs
index cd5b68f1f6..e73c888a3f 100644
--- a/ILSpy/Analyzers/Builtin/TypeInstantiatedByAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/TypeInstantiatedByAnalyzer.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
@@ -30,7 +32,7 @@
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
///
/// Shows methods that instantiate a type.
diff --git a/ILSpy/Analyzers/Builtin/TypeUsedByAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/Builtin/TypeUsedByAnalyzer.cs
similarity index 99%
rename from ILSpy/Analyzers/Builtin/TypeUsedByAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/Builtin/TypeUsedByAnalyzer.cs
index ef7ef3fee6..5cf7aca038 100644
--- a/ILSpy/Analyzers/Builtin/TypeUsedByAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/Builtin/TypeUsedByAnalyzer.cs
@@ -16,6 +16,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
@@ -28,7 +30,7 @@
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers.Builtin
+namespace ICSharpCode.ILSpyX.Analyzers.Builtin
{
///
/// Shows entities that use a type.
diff --git a/ILSpy/Analyzers/ExportAnalyzerAttribute.cs b/ICSharpCode.ILSpyX/Analyzers/ExportAnalyzerAttribute.cs
similarity index 96%
rename from ILSpy/Analyzers/ExportAnalyzerAttribute.cs
rename to ICSharpCode.ILSpyX/Analyzers/ExportAnalyzerAttribute.cs
index e17f6585e4..dd8d36f091 100644
--- a/ILSpy/Analyzers/ExportAnalyzerAttribute.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/ExportAnalyzerAttribute.cs
@@ -16,10 +16,12 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#nullable disable
+
using System;
using System.ComponentModel.Composition;
-namespace ICSharpCode.ILSpy.Analyzers
+namespace ICSharpCode.ILSpyX.Analyzers
{
[MetadataAttribute]
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
diff --git a/ILSpy/Analyzers/IAnalyzer.cs b/ICSharpCode.ILSpyX/Analyzers/IAnalyzer.cs
similarity index 97%
rename from ILSpy/Analyzers/IAnalyzer.cs
rename to ICSharpCode.ILSpyX/Analyzers/IAnalyzer.cs
index ca9d417600..d21a871837 100644
--- a/ILSpy/Analyzers/IAnalyzer.cs
+++ b/ICSharpCode.ILSpyX/Analyzers/IAnalyzer.cs
@@ -20,7 +20,7 @@
using ICSharpCode.Decompiler.TypeSystem;
-namespace ICSharpCode.ILSpy.Analyzers
+namespace ICSharpCode.ILSpyX.Analyzers
{
///
/// Base interface for all analyzers. You can register an analyzer for any by implementing
diff --git a/ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj b/ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj
index a788e3659d..bde8d593a7 100644
--- a/ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj
+++ b/ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj
@@ -62,6 +62,7 @@
+
diff --git a/ILSpy.Tests/Analyzers/AnalyzerScopeTests.cs b/ILSpy.Tests/Analyzers/AnalyzerScopeTests.cs
index 54ccbebd0d..43c74ce85d 100644
--- a/ILSpy.Tests/Analyzers/AnalyzerScopeTests.cs
+++ b/ILSpy.Tests/Analyzers/AnalyzerScopeTests.cs
@@ -23,7 +23,7 @@
using ICSharpCode.Decompiler.CSharp.Resolver;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
-using ICSharpCode.ILSpy.Analyzers;
+using ICSharpCode.ILSpyX.Analyzers;
using NUnit.Framework;
diff --git a/ILSpy.Tests/Analyzers/MemberImplementsInterfaceAnalyzerTests.cs b/ILSpy.Tests/Analyzers/MemberImplementsInterfaceAnalyzerTests.cs
index f3d2f3c933..d27b985ee2 100644
--- a/ILSpy.Tests/Analyzers/MemberImplementsInterfaceAnalyzerTests.cs
+++ b/ILSpy.Tests/Analyzers/MemberImplementsInterfaceAnalyzerTests.cs
@@ -25,8 +25,8 @@
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.Decompiler.TypeSystem.Implementation;
-using ICSharpCode.ILSpy.Analyzers;
-using ICSharpCode.ILSpy.Analyzers.Builtin;
+using ICSharpCode.ILSpyX.Analyzers;
+using ICSharpCode.ILSpyX.Analyzers.Builtin;
using NSubstitute;
diff --git a/ILSpy.Tests/Analyzers/MethodUsesAnalyzerTests.cs b/ILSpy.Tests/Analyzers/MethodUsesAnalyzerTests.cs
index 9cd7726d65..138868c34d 100644
--- a/ILSpy.Tests/Analyzers/MethodUsesAnalyzerTests.cs
+++ b/ILSpy.Tests/Analyzers/MethodUsesAnalyzerTests.cs
@@ -6,8 +6,8 @@
using System.Windows;
using ICSharpCode.Decompiler.TypeSystem;
-using ICSharpCode.ILSpy.Analyzers;
-using ICSharpCode.ILSpy.Analyzers.Builtin;
+using ICSharpCode.ILSpyX.Analyzers;
+using ICSharpCode.ILSpyX.Analyzers.Builtin;
using ICSharpCode.ILSpyX;
using NUnit.Framework;
diff --git a/ILSpy.Tests/Analyzers/TypeUsedByAnalyzerTests.cs b/ILSpy.Tests/Analyzers/TypeUsedByAnalyzerTests.cs
index b89a02d486..0fa18b0230 100644
--- a/ILSpy.Tests/Analyzers/TypeUsedByAnalyzerTests.cs
+++ b/ILSpy.Tests/Analyzers/TypeUsedByAnalyzerTests.cs
@@ -26,8 +26,8 @@
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.Decompiler.TypeSystem.Implementation;
-using ICSharpCode.ILSpy.Analyzers;
-using ICSharpCode.ILSpy.Analyzers.Builtin;
+using ICSharpCode.ILSpyX.Analyzers;
+using ICSharpCode.ILSpyX.Analyzers.Builtin;
using ICSharpCode.ILSpyX;
using NUnit.Framework;
diff --git a/ILSpy/Analyzers/AnalyzerSearchTreeNode.cs b/ILSpy/Analyzers/AnalyzerSearchTreeNode.cs
index 6b908d1ffe..490bf5ec2a 100644
--- a/ILSpy/Analyzers/AnalyzerSearchTreeNode.cs
+++ b/ILSpy/Analyzers/AnalyzerSearchTreeNode.cs
@@ -25,6 +25,7 @@
using ICSharpCode.ILSpy.Analyzers.TreeNodes;
using ICSharpCode.ILSpy.TreeNodes;
using ICSharpCode.ILSpyX;
+using ICSharpCode.ILSpyX.Analyzers;
namespace ICSharpCode.ILSpy.Analyzers
{
diff --git a/ILSpy/Analyzers/TreeNodes/AnalyzedEventTreeNode.cs b/ILSpy/Analyzers/TreeNodes/AnalyzedEventTreeNode.cs
index 923ba56028..8b6ff6f033 100644
--- a/ILSpy/Analyzers/TreeNodes/AnalyzedEventTreeNode.cs
+++ b/ILSpy/Analyzers/TreeNodes/AnalyzedEventTreeNode.cs
@@ -24,6 +24,7 @@
namespace ICSharpCode.ILSpy.Analyzers.TreeNodes
{
using ICSharpCode.Decompiler.TypeSystem;
+ using ICSharpCode.ILSpyX.Analyzers;
internal sealed class AnalyzedEventTreeNode : AnalyzerEntityTreeNode
{
diff --git a/ILSpy/Analyzers/TreeNodes/AnalyzedFieldTreeNode.cs b/ILSpy/Analyzers/TreeNodes/AnalyzedFieldTreeNode.cs
index a3619b7bf8..1f2b9b9a3f 100644
--- a/ILSpy/Analyzers/TreeNodes/AnalyzedFieldTreeNode.cs
+++ b/ILSpy/Analyzers/TreeNodes/AnalyzedFieldTreeNode.cs
@@ -21,6 +21,7 @@
using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.ILSpy.TreeNodes;
+using ICSharpCode.ILSpyX.Analyzers;
namespace ICSharpCode.ILSpy.Analyzers.TreeNodes
{
diff --git a/ILSpy/Analyzers/TreeNodes/AnalyzedMethodTreeNode.cs b/ILSpy/Analyzers/TreeNodes/AnalyzedMethodTreeNode.cs
index 19ce7fa8e8..b7cee8ede4 100644
--- a/ILSpy/Analyzers/TreeNodes/AnalyzedMethodTreeNode.cs
+++ b/ILSpy/Analyzers/TreeNodes/AnalyzedMethodTreeNode.cs
@@ -21,6 +21,7 @@
using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.ILSpy.TreeNodes;
+using ICSharpCode.ILSpyX.Analyzers;
namespace ICSharpCode.ILSpy.Analyzers.TreeNodes
{
diff --git a/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs b/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs
index 5718a85bcc..2c5e7fd531 100644
--- a/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs
+++ b/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs
@@ -21,6 +21,7 @@
using System.Windows;
using ICSharpCode.Decompiler.TypeSystem;
+using ICSharpCode.ILSpyX.Analyzers;
namespace ICSharpCode.ILSpy.Analyzers.TreeNodes
{
diff --git a/ILSpy/Analyzers/TreeNodes/AnalyzedPropertyTreeNode.cs b/ILSpy/Analyzers/TreeNodes/AnalyzedPropertyTreeNode.cs
index d6504f6b97..d19bc3e730 100644
--- a/ILSpy/Analyzers/TreeNodes/AnalyzedPropertyTreeNode.cs
+++ b/ILSpy/Analyzers/TreeNodes/AnalyzedPropertyTreeNode.cs
@@ -21,6 +21,7 @@
using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.ILSpy.TreeNodes;
+using ICSharpCode.ILSpyX.Analyzers;
namespace ICSharpCode.ILSpy.Analyzers.TreeNodes
{
diff --git a/ILSpy/Analyzers/TreeNodes/AnalyzedTypeTreeNode.cs b/ILSpy/Analyzers/TreeNodes/AnalyzedTypeTreeNode.cs
index 52757d1347..6836944eb2 100644
--- a/ILSpy/Analyzers/TreeNodes/AnalyzedTypeTreeNode.cs
+++ b/ILSpy/Analyzers/TreeNodes/AnalyzedTypeTreeNode.cs
@@ -21,6 +21,7 @@
using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.ILSpy.TreeNodes;
+using ICSharpCode.ILSpyX.Analyzers;
namespace ICSharpCode.ILSpy.Analyzers.TreeNodes
{
diff --git a/ILSpy/App.xaml.cs b/ILSpy/App.xaml.cs
index d04697de41..ffb71e67b0 100644
--- a/ILSpy/App.xaml.cs
+++ b/ILSpy/App.xaml.cs
@@ -31,6 +31,7 @@
using System.Windows.Threading;
using ICSharpCode.ILSpy.Options;
+using ICSharpCode.ILSpyX.Analyzers;
using ICSharpCode.ILSpyX.Settings;
using Microsoft.VisualStudio.Composition;
@@ -132,6 +133,8 @@ private static async Task InitializeMef()
}
}
// Add the built-in parts
+ var xParts = await discovery.CreatePartsAsync(typeof(IAnalyzer).Assembly);
+ catalog = catalog.AddParts(xParts);
var createdParts = await discovery.CreatePartsAsync(Assembly.GetExecutingAssembly());
catalog = catalog.AddParts(createdParts);
// If/When the project switches to .NET Standard/Core, this will be needed to allow metadata interfaces (as opposed