diff --git a/ILSpy/Analyzers/ExportAnalyzerAttribute.cs b/ILSpy/Analyzers/ExportAnalyzerAttribute.cs new file mode 100644 index 000000000..e17f6585e --- /dev/null +++ b/ILSpy/Analyzers/ExportAnalyzerAttribute.cs @@ -0,0 +1,35 @@ +// 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. + +using System; +using System.ComponentModel.Composition; + +namespace ICSharpCode.ILSpy.Analyzers +{ + [MetadataAttribute] + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public class ExportAnalyzerAttribute : ExportAttribute, IAnalyzerMetadata + { + public ExportAnalyzerAttribute() : base("Analyzer", typeof(IAnalyzer)) + { } + + public string Header { get; set; } + + public int Order { get; set; } + } +} diff --git a/ILSpy/Analyzers/IAnalyzer.cs b/ILSpy/Analyzers/IAnalyzer.cs index 335e5e13d..ca9d41760 100644 --- a/ILSpy/Analyzers/IAnalyzer.cs +++ b/ILSpy/Analyzers/IAnalyzer.cs @@ -16,9 +16,7 @@ // 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.Generic; -using System.ComponentModel.Composition; using ICSharpCode.Decompiler.TypeSystem; @@ -41,18 +39,6 @@ namespace ICSharpCode.ILSpy.Analyzers IEnumerable Analyze(ISymbol analyzedSymbol, AnalyzerContext context); } - [MetadataAttribute] - [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] - public class ExportAnalyzerAttribute : ExportAttribute, IAnalyzerMetadata - { - public ExportAnalyzerAttribute() : base("Analyzer", typeof(IAnalyzer)) - { } - - public string Header { get; set; } - - public int Order { get; set; } - } - public interface IAnalyzerMetadata { string Header { get; }