提交 2e8351a0 编写于 作者: H Heejae Chang 提交者: Jason Malinowski

Add APIs for adding dynamic files to IWorkspaceProjectContext

This adds an API for the project system to notify us about files that
can generate .cs files in the workspace. The rest of the implementation
is still coming but this unblocks the project system side of things.
上级 58c91c0a
......@@ -2,6 +2,8 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
namespace Microsoft.VisualStudio.LanguageServices.ProjectSystem
......@@ -36,6 +38,8 @@ internal interface IWorkspaceProjectContext : IDisposable
void RemoveSourceFile(string filePath);
void AddAdditionalFile(string filePath, bool isInCurrentContext = true);
void RemoveAdditionalFile(string filePath);
void AddDynamicFile(string filePath, IEnumerable<string> folderNames = null);
void RemoveDynamicFile(string fullPath);
void SetRuleSetFile(string filePath);
void StartBatch();
......
......@@ -101,7 +101,7 @@ public string BinOutputPath
// Compute the ref path based on the non-ref path. Ideally this should come from the
// project system but we don't have a way to fetch that.
_visualStudioProject.OutputRefFilePath =
_visualStudioProject.OutputRefFilePath =
Path.Combine(Path.GetDirectoryName(_visualStudioProject.OutputFilePath),
"ref",
Path.GetFileName(_visualStudioProject.OutputFilePath));
......@@ -184,6 +184,14 @@ public void RemoveAdditionalFile(string filePath)
_visualStudioProject.RemoveAdditionalFile(filePath);
}
public void AddDynamicFile(string filePath, IEnumerable<string> folderNames = null)
{
}
public void RemoveDynamicFile(string fullPath)
{
}
public void SetRuleSetFile(string filePath)
{
// This is now a no-op: we also recieve the rule set file through SetOptions, and we'll just use that one
......@@ -201,7 +209,7 @@ public void EndBatch()
Contract.ThrowIfFalse(_batchScopes.TryDequeue(out var scope));
scope.Dispose();
}
internal VisualStudioProject GetProject_TestOnly()
{
return _visualStudioProject;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册