Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
81d37a65
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,发现更多精彩内容 >>
提交
81d37a65
编写于
6月 28, 2019
作者:
C
Cyrus Najmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Simplify collections. Make local functions static.
上级
f7a19b70
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
22 addition
and
14 deletion
+22
-14
src/EditorFeatures/CSharpTest/CodeActions/SyncNamespace/SyncNamespaceTests_MoveFile.cs
.../CodeActions/SyncNamespace/SyncNamespaceTests_MoveFile.cs
+12
-6
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/DeclarationNameCompletionProviderTests.cs
...letionProviders/DeclarationNameCompletionProviderTests.cs
+2
-2
src/EditorFeatures/CSharpTest/EditAndContinue/EditSessionTests.cs
...orFeatures/CSharpTest/EditAndContinue/EditSessionTests.cs
+1
-1
src/EditorFeatures/CSharpTest/Semantics/SpeculationAnalyzerTests.cs
...Features/CSharpTest/Semantics/SpeculationAnalyzerTests.cs
+1
-1
src/VisualStudio/Core/Def/Implementation/TableDataSource/TableEntriesFactory.cs
...Def/Implementation/TableDataSource/TableEntriesFactory.cs
+4
-2
src/VisualStudio/IntegrationTest/IntegrationTests/AbstractUpdateProjectTest.cs
...grationTest/IntegrationTests/AbstractUpdateProjectTest.cs
+2
-2
未找到文件。
src/EditorFeatures/CSharpTest/CodeActions/SyncNamespace/SyncNamespaceTests_MoveFile.cs
浏览文件 @
81d37a65
...
...
@@ -47,8 +47,10 @@ public async Task MoveFile_SingleAction1()
var
defaultNamespace
=
"A"
;
var
declaredNamespace
=
"A.B.C"
;
var
expectedFolders
=
new
List
<
string
[
]>
();
expectedFolders
.
Add
(
new
[]
{
"B"
,
"C"
});
var
expectedFolders
=
new
List
<
string
[
]>
{
new
[]
{
"B"
,
"C"
}
};
var
documentPath
=
CreateDocumentFilePath
(
Array
.
Empty
<
string
>());
var
code
=
...
...
@@ -77,8 +79,10 @@ public async Task MoveFile_SingleAction2()
var
defaultNamespace
=
"A"
;
var
declaredNamespace
=
"A.B.C.D.E"
;
var
expectedFolders
=
new
List
<
string
[
]>
();
expectedFolders
.
Add
(
new
[]
{
"B"
,
"C"
,
"D"
,
"E"
});
var
expectedFolders
=
new
List
<
string
[
]>
{
new
[]
{
"B"
,
"C"
,
"D"
,
"E"
}
};
var
documentPath1
=
CreateDocumentFilePath
(
Array
.
Empty
<
string
>(),
"File1.cs"
);
var
documentPath2
=
CreateDocumentFilePath
(
new
[]
{
"B"
,
"C"
},
"File2.cs"
);
// file2 is in <root>\B\C\
...
...
@@ -115,8 +119,10 @@ public async Task MoveFile_MoveToRoot()
var
defaultNamespace
=
""
;
var
expectedFolders
=
new
List
<
string
[
]>
();
expectedFolders
.
Add
(
Array
.
Empty
<
string
>());
var
expectedFolders
=
new
List
<
string
[
]>
{
Array
.
Empty
<
string
>()
};
var
documentPath
=
CreateDocumentFilePath
(
new
[]
{
"A"
,
"B"
,
"C"
});
var
code
=
...
...
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/DeclarationNameCompletionProviderTests.cs
浏览文件 @
81d37a65
...
...
@@ -1910,7 +1910,7 @@ private static NamingStylePreferences NamesEndWithSuffixPreferences()
// Local functions
(
SymbolSpecification
specification
,
NamingStyle
style
)
SpecificationStyle
(
SymbolKindOrTypeKind
kind
,
string
suffix
)
static
(
SymbolSpecification
specification
,
NamingStyle
style
)
SpecificationStyle
(
SymbolKindOrTypeKind
kind
,
string
suffix
)
{
var
symbolSpecification
=
new
SymbolSpecification
(
id
:
null
,
...
...
@@ -1930,7 +1930,7 @@ private static NamingStylePreferences NamesEndWithSuffixPreferences()
return
(
symbolSpecification
,
namingStyle
);
}
SerializableNamingRule
CreateRule
(
SymbolSpecification
specification
,
NamingStyle
style
)
static
SerializableNamingRule
CreateRule
(
SymbolSpecification
specification
,
NamingStyle
style
)
{
return
new
SerializableNamingRule
()
{
...
...
src/EditorFeatures/CSharpTest/EditAndContinue/EditSessionTests.cs
浏览文件 @
81d37a65
...
...
@@ -323,7 +323,7 @@ static void Main()
// Test2.M2: adding a line in front of try-catch.
// Test2.F2: moving the entire method 2 lines down.
LinePositionSpan
AddDelta
(
LinePositionSpan
span
,
int
lineDelta
)
static
LinePositionSpan
AddDelta
(
LinePositionSpan
span
,
int
lineDelta
)
=>
new
LinePositionSpan
(
new
LinePosition
(
span
.
Start
.
Line
+
lineDelta
,
span
.
Start
.
Character
),
new
LinePosition
(
span
.
End
.
Line
+
lineDelta
,
span
.
End
.
Character
));
var
newActiveStatementsInChangedDocuments
=
ImmutableArray
.
Create
(
...
...
src/EditorFeatures/CSharpTest/Semantics/SpeculationAnalyzerTests.cs
浏览文件 @
81d37a65
...
...
@@ -512,7 +512,7 @@ protected override Compilation CreateCompilation(SyntaxTree tree)
protected
override
bool
CompilationSucceeded
(
Compilation
compilation
,
Stream
temporaryStream
)
{
var
langCompilation
=
compilation
;
bool
isProblem
(
Diagnostic
d
)
=>
d
.
Severity
>=
DiagnosticSeverity
.
Warning
;
static
bool
isProblem
(
Diagnostic
d
)
=>
d
.
Severity
>=
DiagnosticSeverity
.
Warning
;
return
!
langCompilation
.
GetDiagnostics
().
Any
(
isProblem
)
&&
!
langCompilation
.
Emit
(
temporaryStream
).
Diagnostics
.
Any
(
isProblem
);
}
...
...
src/VisualStudio/Core/Def/Implementation/TableDataSource/TableEntriesFactory.cs
浏览文件 @
81d37a65
...
...
@@ -248,8 +248,10 @@ private void EnsureSources()
{
if
(
_sources
==
null
)
{
_sources
=
new
Dictionary
<
object
,
AbstractTableEntriesSource
<
TItem
>>();
_sources
.
Add
(
_primary
.
Key
,
_primary
);
_sources
=
new
Dictionary
<
object
,
AbstractTableEntriesSource
<
TItem
>>
{
{
_primary
.
Key
,
_primary
}
};
_primary
=
null
;
}
}
...
...
src/VisualStudio/IntegrationTest/IntegrationTests/AbstractUpdateProjectTest.cs
浏览文件 @
81d37a65
...
...
@@ -32,7 +32,7 @@ protected static void VerifyPropertyOutsideConfiguration(XElement projectElement
projectElement
.
Elements
().
Where
(
IsUnconditionalPropertyGroup
),
group
=>
GetPropertyValue
(
group
,
name
)
==
value
);
bool
IsUnconditionalPropertyGroup
(
XElement
element
)
static
bool
IsUnconditionalPropertyGroup
(
XElement
element
)
=>
element
.
Name
.
LocalName
==
"PropertyGroup"
&&
!
element
.
Attributes
().
Any
(
a
=>
a
.
Name
.
LocalName
==
"Condition"
);
}
...
...
@@ -42,7 +42,7 @@ protected static void VerifyPropertyInEachConfiguration(XElement projectElement,
projectElement
.
Elements
().
Where
(
IsConditionalPropertyGroup
),
group
=>
Assert
.
Equal
(
value
,
GetPropertyValue
(
group
,
name
)));
bool
IsConditionalPropertyGroup
(
XElement
element
)
static
bool
IsConditionalPropertyGroup
(
XElement
element
)
=>
element
.
Name
.
LocalName
==
"PropertyGroup"
&&
element
.
Attributes
().
Any
(
a
=>
a
.
Name
.
LocalName
==
"Condition"
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录