Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
5ee2ec0b
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,发现更多精彩内容 >>
提交
5ee2ec0b
编写于
8月 03, 2016
作者:
H
Heejae Chang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed test failures
上级
8e6483ea
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
24 addition
and
17 deletion
+24
-17
src/VisualStudio/Core/Def/Implementation/Diagnostics/VisualStudioWorkspaceDiagnosticAnalyzerProviderService.cs
...VisualStudioWorkspaceDiagnosticAnalyzerProviderService.cs
+5
-2
src/VisualStudio/Core/Test/Diagnostics/MockExtensionManager.vb
...isualStudio/Core/Test/Diagnostics/MockExtensionManager.vb
+16
-12
src/VisualStudio/Core/Test/Diagnostics/VisualStudioWorkspaceDiagnosticAnalyzerProviderServiceTests.vb
...lStudioWorkspaceDiagnosticAnalyzerProviderServiceTests.vb
+3
-3
未找到文件。
src/VisualStudio/Core/Def/Implementation/Diagnostics/VisualStudioWorkspaceDiagnosticAnalyzerProviderService.cs
浏览文件 @
5ee2ec0b
...
...
@@ -21,6 +21,9 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation.Diagnostics
[
Export
(
typeof
(
IWorkspaceDiagnosticAnalyzerProviderService
))]
internal
partial
class
VisualStudioWorkspaceDiagnosticAnalyzerProviderService
:
IWorkspaceDiagnosticAnalyzerProviderService
{
public
const
string
MicrosoftCodeAnalysisCSharp
=
"Microsoft.CodeAnalysis.CSharp.dll"
;
public
const
string
MicrosoftCodeAnalysisVisualBasic
=
"Microsoft.CodeAnalysis.VisualBasic.dll"
;
private
const
string
AnalyzerContentTypeName
=
"Microsoft.VisualStudio.Analyzer"
;
private
readonly
ImmutableArray
<
HostDiagnosticAnalyzerPackage
>
_hostDiagnosticAnalyzerInfo
;
...
...
@@ -124,8 +127,8 @@ private static void EnsureMandatoryAnalyzers(ImmutableArray<HostDiagnosticAnalyz
{
foreach
(
var
package
in
packages
)
{
if
(
package
.
Assemblies
.
Any
(
a
=>
a
?.
EndsWith
(
"Microsoft.CodeAnalysis.CSharp.dll"
,
StringComparison
.
OrdinalIgnoreCase
)
==
true
)
&&
package
.
Assemblies
.
Any
(
a
=>
a
?.
EndsWith
(
"Microsoft.CodeAnalysis.VisualBasic.dll"
,
StringComparison
.
OrdinalIgnoreCase
)
==
true
))
if
(
package
.
Assemblies
.
Any
(
a
=>
a
?.
EndsWith
(
MicrosoftCodeAnalysisCSharp
,
StringComparison
.
OrdinalIgnoreCase
)
==
true
)
&&
package
.
Assemblies
.
Any
(
a
=>
a
?.
EndsWith
(
MicrosoftCodeAnalysisVisualBasic
,
StringComparison
.
OrdinalIgnoreCase
)
==
true
))
{
return
;
}
...
...
src/VisualStudio/Core/Test/Diagnostics/MockExtensionManager.vb
浏览文件 @
5ee2ec0b
...
...
@@ -5,6 +5,7 @@ Imports System.Globalization
Imports
System.IO
Imports
System.Xml
Imports
Microsoft.CodeAnalysis
Imports
Microsoft.VisualStudio.LanguageServices.Implementation.Diagnostics
Imports
Moq
Imports
Roslyn.Utilities
...
...
@@ -30,19 +31,22 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
For
Each
location
In
_locations
Dim
installedExtensionMock
As
New
Mock
(
Of
IMockInstalledExtension
)(
MockBehavior
.
Strict
)
Dim
contentMock
=
New
MockContent
(
_contentType
,
location
)
installedExtensionMock
.
SetupGet
(
Function
(
m
)
m
.
Content
).
Returns
(
SpecializedCollections
.
SingletonEnumerable
(
Of
MockContent
)(
contentMock
))
installedExtensionMock
.
Setup
(
Function
(
m
)
m
.
GetContentLocation
(
contentMock
)).
Returns
(
Function
()
If
contentMock
.
RelativePath
.
IndexOf
(
"$RootFolder$"
)
>=
0
Then
Return
contentMock
.
RelativePath
.
Replace
(
"$RootFolder$"
,
"ResolvedRootFolder"
)
ElseIf
contentMock
.
RelativePath
.
IndexOf
(
"$ShellFolder$"
)
>=
0
Then
Return
contentMock
.
RelativePath
.
Replace
(
"$ShellFolder$"
,
"ResolvedShellFolder"
)
Else
Return
Path
.
Combine
(
"\InstallPath"
,
contentMock
.
RelativePath
)
End
If
End
Function
)
New
MockContent
()
{
New
MockContent
(
_contentType
,
location
),
New
MockContent
(
_contentType
,
VisualStudioWorkspaceDiagnosticAnalyzerProviderService
.
MicrosoftCodeAnalysisCSharp
),
New
MockContent
(
_contentType
,
VisualStudioWorkspaceDiagnosticAnalyzerProviderService
.
MicrosoftCodeAnalysisVisualBasic
)
})
installedExtensionMock
.
Setup
(
Function
(
m
)
m
.
GetContentLocation
(
It
.
IsAny
(
Of
MockContent
))).
Returns
(
Function
(
content
As
MockContent
)
If
content
.
RelativePath
.
IndexOf
(
"$RootFolder$"
)
>=
0
Then
Return
content
.
RelativePath
.
Replace
(
"$RootFolder$"
,
"ResolvedRootFolder"
)
ElseIf
content
.
RelativePath
.
IndexOf
(
"$ShellFolder$"
)
>=
0
Then
Return
content
.
RelativePath
.
Replace
(
"$ShellFolder$"
,
"ResolvedShellFolder"
)
Else
Return
Path
.
Combine
(
"\InstallPath"
,
content
.
RelativePath
)
End
If
End
Function
)
Dim
headerMock
As
New
Mock
(
Of
IMockHeader
)(
MockBehavior
.
Strict
)
headerMock
.
SetupGet
(
Function
(
h
)
h
.
LocalizedName
).
Returns
(
"Vsix"
)
...
...
src/VisualStudio/Core/Test/Diagnostics/VisualStudioWorkspaceDiagnosticAnalyzerProviderServiceTests.vb
浏览文件 @
5ee2ec0b
...
...
@@ -18,15 +18,15 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
Assert
.
Equal
(
packages
.
Count
(),
3
)
Assert
.
Equal
(
packages
(
0
).
Name
,
"Vsix"
)
Assert
.
Equal
(
packages
(
0
).
Assemblies
.
Length
,
1
)
Assert
.
Equal
(
packages
(
0
).
Assemblies
.
Length
,
3
)
Assert
.
Equal
(
packages
(
0
).
Assemblies
(
0
),
"ResolvedRootFolder\test\test.dll"
)
Assert
.
Equal
(
packages
(
1
).
Name
,
"Vsix"
)
Assert
.
Equal
(
packages
(
1
).
Assemblies
.
Length
,
1
)
Assert
.
Equal
(
packages
(
1
).
Assemblies
.
Length
,
3
)
Assert
.
Equal
(
packages
(
1
).
Assemblies
(
0
),
"ResolvedShellFolder\test\test.dll"
)
Assert
.
Equal
(
packages
(
2
).
Name
,
"Vsix"
)
Assert
.
Equal
(
packages
(
2
).
Assemblies
.
Length
,
1
)
Assert
.
Equal
(
packages
(
2
).
Assemblies
.
Length
,
3
)
Assert
.
Equal
(
packages
(
2
).
Assemblies
(
0
),
"\InstallPath\test\test.dll"
)
End
Sub
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录