提交 e63f40a8 编写于 作者: J Jason Malinowski

Remove some shims that were being used by Live Unit Testing

上级 436829d0
......@@ -22,7 +22,7 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem
{
using Workspace = Microsoft.CodeAnalysis.Workspace;
[Obsolete("This is a compatibility shim for TypeScript and Live Unit Testing; please do not use it.")]
[Obsolete("This is a compatibility shim for TypeScript; please do not use it.")]
internal abstract partial class AbstractProject : ForegroundThreadAffinitizedObject, IVisualStudioHostProject
{
internal const string ProjectGuidPropertyName = "ProjectGuid";
......
......@@ -5,12 +5,10 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.CodeAnalysis.Host;
using Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.Extensions;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem
{
......
......@@ -291,19 +291,6 @@ internal VisualStudioProjectTracker ProjectTracker
return null;
}
[Obsolete("This is a compatibility shim for Live Unit Testing; please do not use it.")]
internal AbstractProject? GetHostProject(ProjectId projectId)
{
var project = CurrentSolution.GetProject(projectId);
if (project == null)
{
return null;
}
return new StubProject(ProjectTracker, project, GetHierarchy(projectId), project.OutputFilePath);
}
// TODO: consider whether this should be going to the project system directly to get this path. This is only called on interactions from the
// Solution Explorer in the SolutionExplorerShim, where if we just could more directly get to the rule set file it'd simplify this.
internal override string? TryGetRuleSetPathForProject(ProjectId projectId)
......@@ -321,21 +308,6 @@ internal VisualStudioProjectTracker ProjectTracker
}
}
[Obsolete("This is a compatibility shim for Live Unit Testing; please do not use it.")]
private sealed class StubProject : AbstractProject
{
private readonly string? _outputPath;
public StubProject(VisualStudioProjectTracker projectTracker, CodeAnalysis.Project project, IVsHierarchy? hierarchy, string? outputPath)
: base(projectTracker, null, project.Name + "_Stub", null, hierarchy, project.Language, Guid.Empty, null, null, null, null)
{
_outputPath = outputPath;
}
protected override string? GetOutputFilePath()
=> _outputPath;
}
[Obsolete("This is a compatibility shim for TypeScript; please do not use it.")]
internal IVisualStudioHostDocument? GetHostDocument(DocumentId documentId)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册