diff --git a/src/Tools/ExternalAccess/FSharp/Diagnostics/IFSharpProjectDiagnosticAnalyzer.cs b/src/Tools/ExternalAccess/FSharp/Diagnostics/IFSharpProjectDiagnosticAnalyzer.cs deleted file mode 100644 index 45803c59c6e0b8d00823f3edc3b8c9463bfd29c6..0000000000000000000000000000000000000000 --- a/src/Tools/ExternalAccess/FSharp/Diagnostics/IFSharpProjectDiagnosticAnalyzer.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Collections.Immutable; -using System.Threading; -using System.Threading.Tasks; - -namespace Microsoft.CodeAnalysis.ExternalAccess.FSharp.Diagnostics -{ - internal interface IFSharpProjectDiagnosticAnalyzer - { - Task> AnalyzeProjectAsync(Project project, CancellationToken cancellationToken); - } -} diff --git a/src/Tools/ExternalAccess/FSharp/Internal/Diagnostics/FSharpProjectDiagnosticAnalyzer.cs b/src/Tools/ExternalAccess/FSharp/Internal/Diagnostics/FSharpProjectDiagnosticAnalyzer.cs deleted file mode 100644 index 64fdff8c9b0ae66fa83d963856660502a52284ac..0000000000000000000000000000000000000000 --- a/src/Tools/ExternalAccess/FSharp/Internal/Diagnostics/FSharpProjectDiagnosticAnalyzer.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Immutable; -using System.Composition; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.CodeAnalysis.ExternalAccess.FSharp.Diagnostics; -using Microsoft.CodeAnalysis.Host; -using Microsoft.CodeAnalysis.Host.Mef; - -namespace Microsoft.CodeAnalysis.ExternalAccess.FSharp.Internal.Diagnostics -{ - [Shared] - [ExportLanguageService(typeof(FSharpProjectDiagnosticAnalyzerService), LanguageNames.FSharp)] - internal class FSharpProjectDiagnosticAnalyzerService : ILanguageService - { - private readonly IFSharpProjectDiagnosticAnalyzer _analyzer; - - [ImportingConstructor] - [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)] - public FSharpProjectDiagnosticAnalyzerService(IFSharpProjectDiagnosticAnalyzer analyzer) - { - _analyzer = analyzer; - } - - public Task> AnalyzeProjectAsync(Project project, CancellationToken cancellationToken) - { - return _analyzer.AnalyzeProjectAsync(project, cancellationToken); - } - } - - [DiagnosticAnalyzer(LanguageNames.FSharp)] - internal class FSharpProjectDiagnosticAnalyzer : ProjectDiagnosticAnalyzer - { - private readonly ImmutableArray _supportedDiagnostics; - - public FSharpProjectDiagnosticAnalyzer() - { - _supportedDiagnostics = FSharpDocumentDiagnosticAnalyzer.CreateSupportedDiagnostics(); - } - - public override ImmutableArray SupportedDiagnostics => _supportedDiagnostics; - - public override Task> AnalyzeProjectAsync(Project project, CancellationToken cancellationToken) - { - var analyzer = project.LanguageServices.GetService(); - if (analyzer == null) - { - return Task.FromResult(ImmutableArray.Empty); - } - - return analyzer.AnalyzeProjectAsync(project, cancellationToken); - } - } -}