Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
51de32fb
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,发现更多精彩内容 >>
提交
51de32fb
编写于
5月 10, 2017
作者:
C
CyrusNajmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename parameter.
上级
c0adc624
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
9 deletion
+9
-9
src/Workspaces/Core/Portable/FindSymbols/SymbolTree/SymbolTreeInfo_Metadata.cs
...ortable/FindSymbols/SymbolTree/SymbolTreeInfo_Metadata.cs
+1
-1
src/Workspaces/Core/Portable/FindSymbols/SymbolTree/SymbolTreeInfo_Serialization.cs
...le/FindSymbols/SymbolTree/SymbolTreeInfo_Serialization.cs
+6
-6
src/Workspaces/Core/Portable/FindSymbols/SymbolTree/SymbolTreeInfo_Source.cs
.../Portable/FindSymbols/SymbolTree/SymbolTreeInfo_Source.cs
+1
-1
src/Workspaces/Core/Portable/Utilities/SpellChecker.cs
src/Workspaces/Core/Portable/Utilities/SpellChecker.cs
+1
-1
未找到文件。
src/Workspaces/Core/Portable/FindSymbols/SymbolTree/SymbolTreeInfo_Metadata.cs
浏览文件 @
51de32fb
...
...
@@ -161,7 +161,7 @@ private static Metadata GetMetadataNoThrow(PortableExecutableReference reference
loadOnly
,
createAsync
:
()
=>
CreateMetadataSymbolTreeInfoAsync
(
solution
,
checksum
,
reference
,
cancellationToken
),
keySuffix
:
"_Metadata_"
+
filePath
,
readObject
:
reader
=>
ReadSymbolTreeInfo
(
reader
,
(
names
,
nodes
)
=>
GetSpellCheckerTask
(
solution
,
checksum
,
filePath
,
names
,
nodes
)),
tryReadObject
:
reader
=>
Try
ReadSymbolTreeInfo
(
reader
,
(
names
,
nodes
)
=>
GetSpellCheckerTask
(
solution
,
checksum
,
filePath
,
names
,
nodes
)),
cancellationToken
:
cancellationToken
);
Contract
.
ThrowIfFalse
(
result
!=
null
||
loadOnly
==
true
,
"Result can only be null if 'loadOnly: true' was passed."
);
return
result
;
...
...
src/Workspaces/Core/Portable/FindSymbols/SymbolTree/SymbolTreeInfo_Serialization.cs
浏览文件 @
51de32fb
...
...
@@ -36,7 +36,7 @@ internal partial class SymbolTreeInfo : IObjectWritable
loadOnly
:
false
,
createAsync
:
()
=>
CreateSpellCheckerAsync
(
checksum
,
concatenatedNames
,
sortedNodes
),
keySuffix
:
"_SpellChecker_"
+
filePath
,
readObject
:
SpellChecker
.
ReadFrom
,
tryReadObject
:
SpellChecker
.
Try
ReadFrom
,
cancellationToken
:
CancellationToken
.
None
);
Contract
.
ThrowIfNull
(
result
,
"Result should never be null as we passed 'loadOnly: false'."
);
return
result
;
...
...
@@ -52,7 +52,7 @@ internal partial class SymbolTreeInfo : IObjectWritable
bool
loadOnly
,
Func
<
Task
<
T
>>
createAsync
,
string
keySuffix
,
Func
<
ObjectReader
,
T
>
r
eadObject
,
Func
<
ObjectReader
,
T
>
tryR
eadObject
,
CancellationToken
cancellationToken
)
where
T
:
class
,
IObjectWritable
,
IChecksummedObject
{
if
(
checksum
==
null
)
...
...
@@ -76,8 +76,8 @@ internal partial class SymbolTreeInfo : IObjectWritable
// We have some previously persisted data. Attempt to read it back.
// If we're able to, and the version of the persisted data matches
// our version, then we can reuse this instance.
result
=
r
eadObject
(
reader
);
if
(
result
!=
null
&&
c
hecksum
==
result
.
Checksum
)
result
=
tryR
eadObject
(
reader
);
if
(
result
?.
C
hecksum
==
result
.
Checksum
)
{
return
result
;
}
...
...
@@ -142,12 +142,12 @@ public void WriteTo(ObjectWriter writer)
internal
static
SymbolTreeInfo
ReadSymbolTreeInfo_ForTestingPurposesOnly
(
ObjectReader
reader
,
Checksum
checksum
)
{
return
ReadSymbolTreeInfo
(
reader
,
return
Try
ReadSymbolTreeInfo
(
reader
,
(
names
,
nodes
)
=>
Task
.
FromResult
(
new
SpellChecker
(
checksum
,
nodes
.
Select
(
n
=>
new
StringSlice
(
names
,
n
.
NameSpan
)))));
}
private
static
SymbolTreeInfo
ReadSymbolTreeInfo
(
private
static
SymbolTreeInfo
Try
ReadSymbolTreeInfo
(
ObjectReader
reader
,
Func
<
string
,
Node
[],
Task
<
SpellChecker
>>
createSpellCheckerTask
)
{
...
...
src/Workspaces/Core/Portable/FindSymbols/SymbolTree/SymbolTreeInfo_Source.cs
浏览文件 @
51de32fb
...
...
@@ -35,7 +35,7 @@ private static void FreeSymbolMap(MultiDictionary<string, ISymbol> symbolMap)
loadOnly
:
false
,
createAsync
:
()
=>
CreateSourceSymbolTreeInfoAsync
(
project
,
checksum
,
cancellationToken
),
keySuffix
:
"_Source_"
+
project
.
FilePath
,
readObject
:
reader
=>
ReadSymbolTreeInfo
(
reader
,
(
names
,
nodes
)
=>
GetSpellCheckerTask
(
project
.
Solution
,
checksum
,
project
.
FilePath
,
names
,
nodes
)),
tryReadObject
:
reader
=>
Try
ReadSymbolTreeInfo
(
reader
,
(
names
,
nodes
)
=>
GetSpellCheckerTask
(
project
.
Solution
,
checksum
,
project
.
FilePath
,
names
,
nodes
)),
cancellationToken
:
cancellationToken
);
Contract
.
ThrowIfNull
(
result
,
"Result should never be null as we passed 'loadOnly: false'."
);
return
result
;
...
...
src/Workspaces/Core/Portable/Utilities/SpellChecker.cs
浏览文件 @
51de32fb
...
...
@@ -49,7 +49,7 @@ void IObjectWritable.WriteTo(ObjectWriter writer)
_bkTree
.
WriteTo
(
writer
);
}
internal
static
SpellChecker
ReadFrom
(
ObjectReader
reader
)
internal
static
SpellChecker
Try
ReadFrom
(
ObjectReader
reader
)
{
try
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录