提交 db198986 编写于 作者: M Manish Vasani

Few more reverts for the new approach.

上级 0fb27575
......@@ -10,7 +10,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)AnalyzerExecutor.cs" />
<Compile Include="$(MSBuildThisFileDirectory)AnalyzerExceptionDiagnosticArgs.cs" />
<Compile Include="$(MSBuildThisFileDirectory)AnalyzerManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DeclarationComputer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DeclarationInfo.cs" />
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
namespace Microsoft.CodeAnalysis.Diagnostics
{
internal class AnalyzerExceptionDiagnosticArgs : EventArgs
{
public readonly Diagnostic Diagnostic;
public readonly DiagnosticAnalyzer FaultedAnalyzer;
public AnalyzerExceptionDiagnosticArgs(DiagnosticAnalyzer analyzer, Diagnostic diagnostic)
{
this.FaultedAnalyzer = analyzer;
this.Diagnostic = diagnostic;
}
}
}
......@@ -77,8 +77,7 @@ public class DeclarePublicAPIAnalyzer : DiagnosticAnalyzer
MethodKind.EventRemove
};
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics // ImmutableArray.Create(DeclareNewApiRule, RemoveDeletedApiRule);
{ get { throw new Exception(); } }
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DeclareNewApiRule, RemoveDeletedApiRule);
public override void Initialize(AnalysisContext context)
{
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
namespace Microsoft.CodeAnalysis.Diagnostics
{
internal class WorkspaceAnalyzerExceptionDiagnosticArgs : EventArgs
{
public readonly Diagnostic Diagnostic;
public readonly DiagnosticAnalyzer FaultedAnalyzer;
public readonly Workspace Workspace;
public readonly Project ProjectOpt;
public WorkspaceAnalyzerExceptionDiagnosticArgs(DiagnosticAnalyzer analyzer, Diagnostic diagnostic, Workspace workspace, Project projectOpt = null)
{
this.FaultedAnalyzer = analyzer;
this.Diagnostic = diagnostic;
this.Workspace = workspace;
this.ProjectOpt = projectOpt;
}
}
}
......@@ -177,7 +177,6 @@
<Compile Include="Completion\Providers\KeywordCompletionItem.cs" />
<Compile Include="Completion\Providers\RecommendedKeyword.cs" />
<Compile Include="Diagnostics\AnalyzerDriverResources.cs" />
<Compile Include="Diagnostics\WorkspaceAnalyzerExceptionDiagnosticArgs.cs" />
<Compile Include="Diagnostics\AnalyzerHelper.cs" />
<Compile Include="Diagnostics\AbstractHostDiagnosticUpdateSource.cs" />
<Compile Include="Diagnostics\WorkspaceAnalyzerManager.cs" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册