Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
e34d8177
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e34d8177
编写于
5月 29, 2017
作者:
C
CyrusNajmabadi
提交者:
GitHub
5月 29, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #19850 from CyrusNajmabadi/workspaceTestKind
Add a specific WorkspaceKind for test workspaces.
上级
4ad275b7
56703003
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
9 addition
and
10 deletion
+9
-10
src/EditorFeatures/TestUtilities/Structure/AbstractSyntaxStructureProviderTests.cs
...ilities/Structure/AbstractSyntaxStructureProviderTests.cs
+1
-1
src/EditorFeatures/TestUtilities/Workspaces/TestAddMetadataReferenceCodeActionOperationFactoryWorkspaceService.cs
...ataReferenceCodeActionOperationFactoryWorkspaceService.cs
+1
-1
src/EditorFeatures/TestUtilities/Workspaces/TestFormattingRuleFactoryServiceFactory.cs
...ies/Workspaces/TestFormattingRuleFactoryServiceFactory.cs
+1
-1
src/EditorFeatures/TestUtilities/Workspaces/TestSymbolRenamedCodeActionOperationFactoryWorkspaceService.cs
...ymbolRenamedCodeActionOperationFactoryWorkspaceService.cs
+1
-1
src/EditorFeatures/TestUtilities/Workspaces/TestWorkspace.cs
src/EditorFeatures/TestUtilities/Workspaces/TestWorkspace.cs
+2
-4
src/Features/Core/Portable/AddImport/AbstractAddImportCodeFixProvider.cs
...re/Portable/AddImport/AbstractAddImportCodeFixProvider.cs
+1
-1
src/Features/Core/Portable/IncrementalCaches/SymbolTreeInfoIncrementalAnalyzerProvider.cs
...mentalCaches/SymbolTreeInfoIncrementalAnalyzerProvider.cs
+1
-1
src/Workspaces/Core/Portable/Workspace/WorkspaceKind.cs
src/Workspaces/Core/Portable/Workspace/WorkspaceKind.cs
+1
-0
未找到文件。
src/EditorFeatures/TestUtilities/Structure/AbstractSyntaxStructureProviderTests.cs
浏览文件 @
e34d8177
...
...
@@ -17,7 +17,7 @@ public abstract class AbstractSyntaxStructureProviderTests
{
protected
abstract
string
LanguageName
{
get
;
}
protected
virtual
string
WorkspaceKind
=>
TestWorkspace
.
WorkspaceName
;
protected
virtual
string
WorkspaceKind
=>
CodeAnalysis
.
WorkspaceKind
.
Test
;
private
Task
<
ImmutableArray
<
BlockSpan
>>
GetBlockSpansAsync
(
Document
document
,
int
position
)
{
...
...
src/EditorFeatures/TestUtilities/Workspaces/TestAddMetadataReferenceCodeActionOperationFactoryWorkspaceService.cs
浏览文件 @
e34d8177
...
...
@@ -14,7 +14,7 @@
namespace
Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces
{
[
ExportWorkspaceService
(
typeof
(
IAddMetadataReferenceCodeActionOperationFactoryWorkspaceService
),
TestWorkspace
.
WorkspaceName
),
Shared
]
[
ExportWorkspaceService
(
typeof
(
IAddMetadataReferenceCodeActionOperationFactoryWorkspaceService
),
WorkspaceKind
.
Test
),
Shared
]
public
class
TestAddMetadataReferenceCodeActionOperationFactoryWorkspaceService
:
IAddMetadataReferenceCodeActionOperationFactoryWorkspaceService
{
public
CodeActionOperation
CreateAddMetadataReferenceOperation
(
ProjectId
projectId
,
AssemblyIdentity
assemblyIdentity
)
...
...
src/EditorFeatures/TestUtilities/Workspaces/TestFormattingRuleFactoryServiceFactory.cs
浏览文件 @
e34d8177
...
...
@@ -10,7 +10,7 @@
namespace
Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces
{
[
ExportWorkspaceServiceFactory
(
typeof
(
IHostDependentFormattingRuleFactoryService
),
TestWorkspace
.
WorkspaceName
),
Shared
]
[
ExportWorkspaceServiceFactory
(
typeof
(
IHostDependentFormattingRuleFactoryService
),
WorkspaceKind
.
Test
),
Shared
]
internal
sealed
class
TestFormattingRuleFactoryServiceFactory
:
IWorkspaceServiceFactory
{
public
TestFormattingRuleFactoryServiceFactory
()
...
...
src/EditorFeatures/TestUtilities/Workspaces/TestSymbolRenamedCodeActionOperationFactoryWorkspaceService.cs
浏览文件 @
e34d8177
...
...
@@ -7,7 +7,7 @@
namespace
Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces
{
[
ExportWorkspaceService
(
typeof
(
ISymbolRenamedCodeActionOperationFactoryWorkspaceService
),
TestWorkspace
.
WorkspaceName
),
Shared
]
[
ExportWorkspaceService
(
typeof
(
ISymbolRenamedCodeActionOperationFactoryWorkspaceService
),
WorkspaceKind
.
Test
),
Shared
]
public
class
TestSymbolRenamedCodeActionOperationFactoryWorkspaceService
:
ISymbolRenamedCodeActionOperationFactoryWorkspaceService
{
public
CodeActionOperation
CreateSymbolRenamedOperation
(
ISymbol
symbol
,
string
newName
,
Solution
startingSolution
,
Solution
updatedSolution
)
...
...
src/EditorFeatures/TestUtilities/Workspaces/TestWorkspace.cs
浏览文件 @
e34d8177
...
...
@@ -25,8 +25,6 @@ namespace Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces
{
public
partial
class
TestWorkspace
:
Workspace
{
public
const
string
WorkspaceName
=
TestWorkspaceName
.
Name
;
public
ExportProvider
ExportProvider
{
get
;
}
public
bool
CanApplyChangeDocument
{
get
;
set
;
}
...
...
@@ -42,12 +40,12 @@ public partial class TestWorkspace : Workspace
private
readonly
BackgroundParser
_backgroundParser
;
public
TestWorkspace
()
:
this
(
TestExportProvider
.
ExportProviderWithCSharpAndVisualBasic
,
Workspace
Name
)
:
this
(
TestExportProvider
.
ExportProviderWithCSharpAndVisualBasic
,
Workspace
Kind
.
Test
)
{
}
public
TestWorkspace
(
ExportProvider
exportProvider
,
string
workspaceKind
=
null
,
bool
disablePartialSolutions
=
true
)
:
base
(
MefV1HostServices
.
Create
(
exportProvider
.
AsExportProvider
()),
workspaceKind
??
Workspace
Name
)
:
base
(
MefV1HostServices
.
Create
(
exportProvider
.
AsExportProvider
()),
workspaceKind
??
Workspace
Kind
.
Test
)
{
ResetThreadAffinity
();
...
...
src/Features/Core/Portable/AddImport/AbstractAddImportCodeFixProvider.cs
浏览文件 @
e34d8177
...
...
@@ -154,7 +154,7 @@ private async Task<int> HandleDiagnosticAsync(CodeFixContext context, Diagnostic
private
static
bool
IsHostOrTestWorkspace
(
Project
project
)
{
return
project
.
Solution
.
Workspace
.
Kind
==
WorkspaceKind
.
Host
||
project
.
Solution
.
Workspace
.
Kind
==
"Test"
;
project
.
Solution
.
Workspace
.
Kind
==
WorkspaceKind
.
Test
;
}
private
async
Task
<
ImmutableArray
<
Reference
>>
FindResultsAsync
(
...
...
src/Features/Core/Portable/IncrementalCaches/SymbolTreeInfoIncrementalAnalyzerProvider.cs
浏览文件 @
e34d8177
...
...
@@ -187,7 +187,7 @@ private async Task UpdateSymbolTreeInfoAsync(Project project, CancellationToken
return
;
}
if
(
project
.
Solution
.
Workspace
.
Kind
!=
"Test"
&&
if
(
project
.
Solution
.
Workspace
.
Kind
!=
WorkspaceKind
.
Test
&&
project
.
Solution
.
Workspace
.
Kind
!=
WorkspaceKind
.
RemoteWorkspace
&&
project
.
Solution
.
Workspace
.
Options
.
GetOption
(
NavigateToOptions
.
OutOfProcessAllowed
))
{
...
...
src/Workspaces/Core/Portable/Workspace/WorkspaceKind.cs
浏览文件 @
e34d8177
...
...
@@ -15,6 +15,7 @@ public static class WorkspaceKind
public
const
string
MiscellaneousFiles
=
nameof
(
MiscellaneousFiles
);
public
const
string
Preview
=
nameof
(
Preview
);
internal
const
string
Test
=
nameof
(
Test
);
internal
const
string
AnyCodeRoslynWorkspace
=
nameof
(
AnyCodeRoslynWorkspace
);
internal
const
string
RemoteWorkspace
=
nameof
(
RemoteWorkspace
);
internal
const
string
RemoteTemporaryWorkspace
=
nameof
(
RemoteTemporaryWorkspace
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录