diff --git a/src/EditorFeatures/Core/Implementation/CommentSelection/CommentSelectionServiceProxy.cs b/src/EditorFeatures/Core/Implementation/CommentSelection/CommentSelectionServiceProxy.cs deleted file mode 100644 index 60e11f3b5172a383669236ebc0a611eabe33ed59..0000000000000000000000000000000000000000 --- a/src/EditorFeatures/Core/Implementation/CommentSelection/CommentSelectionServiceProxy.cs +++ /dev/null @@ -1,34 +0,0 @@ -// 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.Collections.Immutable; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.CodeAnalysis.CommentSelection; -using Microsoft.CodeAnalysis.Text; - -namespace Microsoft.CodeAnalysis.Editor.Implementation.CommentSelection -{ - /// - /// Bridge between the new and an existing - /// language which only supplies the old service. - /// - internal class CommentSelectionServiceProxy : ICommentSelectionService - { -#pragma warning disable CS0618 // Type or member is obsolete - private readonly ICommentUncommentService _commentUncommentService; - - public CommentSelectionServiceProxy(ICommentUncommentService commentUncommentService) - { - _commentUncommentService = commentUncommentService; - } -#pragma warning restore CS0618 // Type or member is obsolete - - public Task GetInfoAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken) - => Task.FromResult(new CommentSelectionInfo( - true, _commentUncommentService.SupportsBlockComment, _commentUncommentService.SingleLineCommentString, - _commentUncommentService.BlockCommentStartString, _commentUncommentService.BlockCommentEndString)); - - public Task FormatAsync(Document document, ImmutableArray changes, CancellationToken cancellationToken) - => Task.FromResult(_commentUncommentService.Format(document, changes, cancellationToken)); - } -} diff --git a/src/EditorFeatures/Core/Implementation/CommentSelection/CommentUncommentSelectionCommandHandler.cs b/src/EditorFeatures/Core/Implementation/CommentSelection/CommentUncommentSelectionCommandHandler.cs index 22155c9955184a7c22a52bf4ac71a494ce5cf3f7..caaced69998d6ae4fd154bccd8e660d01524b16b 100644 --- a/src/EditorFeatures/Core/Implementation/CommentSelection/CommentUncommentSelectionCommandHandler.cs +++ b/src/EditorFeatures/Core/Implementation/CommentSelection/CommentUncommentSelectionCommandHandler.cs @@ -146,15 +146,6 @@ private ICommentSelectionService GetService(Document document) return service; } - // If we couldn't find one, fallback to the legacy service. -#pragma warning disable CS0618 // Type or member is obsolete - var legacyService = document.GetLanguageService(); -#pragma warning restore CS0618 // Type or member is obsolete - if (legacyService != null) - { - return new CommentSelectionServiceProxy(legacyService); - } - return null; } diff --git a/src/EditorFeatures/Core/Implementation/CommentSelection/ICommentUncommentService.cs b/src/EditorFeatures/Core/Implementation/CommentSelection/ICommentUncommentService.cs deleted file mode 100644 index 7e1b261a056c8fedb4c9d69b0772be50cc65cb85..0000000000000000000000000000000000000000 --- a/src/EditorFeatures/Core/Implementation/CommentSelection/ICommentUncommentService.cs +++ /dev/null @@ -1,21 +0,0 @@ -// 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; -using System.Collections.Generic; -using System.Threading; -using Microsoft.CodeAnalysis.Host; -using Microsoft.CodeAnalysis.Text; - -namespace Microsoft.CodeAnalysis.Editor.Implementation.CommentSelection -{ - [Obsolete("Use Microsoft.CodeAnalysis.CommentSelection.ICommentSelectionService instead")] - internal interface ICommentUncommentService : ILanguageService - { - string SingleLineCommentString { get; } - bool SupportsBlockComment { get; } - string BlockCommentStartString { get; } - string BlockCommentEndString { get; } - - Document Format(Document document, IEnumerable changes, CancellationToken cancellationToken); - } -}