diff --git a/src/OmniSharp.Roslyn/HostServicesAggregator.cs b/src/OmniSharp.Roslyn/HostServicesAggregator.cs index 709510c6d0..8ec0f85b02 100644 --- a/src/OmniSharp.Roslyn/HostServicesAggregator.cs +++ b/src/OmniSharp.Roslyn/HostServicesAggregator.cs @@ -60,7 +60,7 @@ public HostServicesAggregator( } } - builder.Add(typeof(OmniSharpSymbolRenamedCodeActionOperationFactoryWorkspaceService).Assembly); + builder.Add(typeof(PickMemberWorkspaceService).Assembly); _assemblies = builder.ToImmutableArray(); _options = options; } diff --git a/src/OmniSharp.Roslyn/WorkspaceServices/OmniSharpSymbolRenamedCodeActionOperationFactoryWorkspaceService.cs b/src/OmniSharp.Roslyn/WorkspaceServices/OmniSharpSymbolRenamedCodeActionOperationFactoryWorkspaceService.cs deleted file mode 100644 index 8c1ba7ec71..0000000000 --- a/src/OmniSharp.Roslyn/WorkspaceServices/OmniSharpSymbolRenamedCodeActionOperationFactoryWorkspaceService.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Composition; -using System.Threading; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CodeActions; -using Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.CodeRefactorings.WorkspaceServices; - -namespace OmniSharp -{ - [Shared] - [Export(typeof(IOmniSharpSymbolRenamedCodeActionOperationFactoryWorkspaceService))] - public class OmniSharpSymbolRenamedCodeActionOperationFactoryWorkspaceService : IOmniSharpSymbolRenamedCodeActionOperationFactoryWorkspaceService - { - [ImportingConstructor] - public OmniSharpSymbolRenamedCodeActionOperationFactoryWorkspaceService() - { - } - - public CodeActionOperation CreateSymbolRenamedOperation(ISymbol symbol, string newName, Solution startingSolution, Solution updatedSolution) - { - return new RenameSymbolOperation( - symbol, - newName, - updatedSolution); - } - - private class RenameSymbolOperation : CodeActionOperation - { - private readonly ISymbol _symbol; - private readonly string _newName; - private readonly Solution _updatedSolution; - - public RenameSymbolOperation( - ISymbol symbol, - string newName, - Solution updatedSolution) - { - _symbol = symbol; - _newName = newName; - _updatedSolution = updatedSolution; - } - - public override void Apply(Workspace workspace, CancellationToken cancellationToken = default) - { - workspace.TryApplyChanges(_updatedSolution); - } - - public override string Title => $"Rename {_symbol.Name} to {_newName}"; - } - } -}