introduce dotnet complete command

This commit is contained in:
jonsequitur 2017-03-02 19:36:51 -08:00
parent 2048940760
commit d40a87bc44
9 changed files with 650 additions and 2 deletions

View file

@ -24,6 +24,7 @@ namespace Microsoft.DotNet.Tools
private ProjectCollection _projects;
private List<NuGetFramework> _cachedTfms = null;
private IEnumerable<string> cachedRuntimeIdentifiers;
private MsbuildProject(ProjectCollection projects, ProjectRootElement project)
{
@ -149,6 +150,12 @@ namespace Microsoft.DotNet.Tools
return ProjectRootElement.GetAllItemsWithElementType(ProjectItemElementType);
}
public IEnumerable<string> GetRuntimeIdentifiers()
{
return cachedRuntimeIdentifiers ??
(cachedRuntimeIdentifiers = GetEvaluatedProject().GetRuntimeIdentifiers());
}
public IEnumerable<NuGetFramework> GetTargetFrameworks()
{
if (_cachedTfms != null)