Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
33c6af15
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,发现更多精彩内容 >>
提交
33c6af15
编写于
11月 11, 2015
作者:
C
Cyrus Najmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make more code async.
上级
4941c8a4
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
10 addition
and
10 deletion
+10
-10
src/EditorFeatures/CSharpTest/Diagnostics/UseAutoProperty/UseAutoPropertyTests.cs
...pTest/Diagnostics/UseAutoProperty/UseAutoPropertyTests.cs
+1
-1
src/EditorFeatures/Core/Implementation/CodeActions/CodeActionEditHandlerService.cs
...mplementation/CodeActions/CodeActionEditHandlerService.cs
+1
-1
src/Workspaces/Core/Portable/CodeCleanup/AbstractCodeCleanerService.cs
...s/Core/Portable/CodeCleanup/AbstractCodeCleanerService.cs
+1
-1
src/Workspaces/Core/Portable/Rename/ConflictEngine/ConflictResolver.Session.cs
...ortable/Rename/ConflictEngine/ConflictResolver.Session.cs
+4
-4
src/Workspaces/Core/Portable/Shared/Extensions/DocumentExtensions.cs
...ces/Core/Portable/Shared/Extensions/DocumentExtensions.cs
+2
-2
src/Workspaces/Core/Portable/Simplification/AbstractSimplificationService.cs
.../Portable/Simplification/AbstractSimplificationService.cs
+1
-1
未找到文件。
src/EditorFeatures/CSharpTest/Diagnostics/UseAutoProperty/UseAutoPropertyTests.cs
浏览文件 @
33c6af15
...
...
@@ -266,4 +266,4 @@ public async Task TestAlreadyAutoPropertyWithGetterAndSetterWithNoBody()
await
TestMissingAsync
(
@"class Class { public int [|P|] { get; set; } }"
);
}
}
}
}
\ No newline at end of file
src/EditorFeatures/Core/Implementation/CodeActions/CodeActionEditHandlerService.cs
浏览文件 @
33c6af15
...
...
@@ -95,7 +95,7 @@ public void Apply(Workspace workspace, Document fromDocument, IEnumerable<CodeAc
{
foreach
(
var
document
in
project
.
Documents
)
{
if
(!
document
.
HasAnyErrors
(
cancellationToken
).
WaitAndGetResult
(
cancellationToken
))
if
(!
document
.
HasAnyErrors
Async
(
cancellationToken
).
WaitAndGetResult
(
cancellationToken
))
{
documentErrorLookup
.
Add
(
document
.
Id
);
}
...
...
src/Workspaces/Core/Portable/CodeCleanup/AbstractCodeCleanerService.cs
浏览文件 @
33c6af15
...
...
@@ -458,7 +458,7 @@ private bool CleanupWholeNode(TextSpan nodeSpan, IEnumerable<TextSpan> spans)
IEnumerable
<
TextSpan
>
spans
=
null
;
#if DEBUG
bool
originalDocHasErrors
=
await
annotatedDocument
.
HasAnyErrors
(
cancellationToken
).
ConfigureAwait
(
false
);
bool
originalDocHasErrors
=
await
annotatedDocument
.
HasAnyErrors
Async
(
cancellationToken
).
ConfigureAwait
(
false
);
#endif
var
current
=
0
;
...
...
src/Workspaces/Core/Portable/Rename/ConflictEngine/ConflictResolver.Session.cs
浏览文件 @
33c6af15
...
...
@@ -228,7 +228,7 @@ public async Task<ConflictResolution> ResolveConflictsAsync()
}
}
#if DEBUG
DebugVerifyNoErrors
(
conflictResolution
,
_documentsIdsToBeCheckedForConflict
);
await
DebugVerifyNoErrorsAsync
(
conflictResolution
,
_documentsIdsToBeCheckedForConflict
).
ConfigureAwait
(
false
);
#endif
return
conflictResolution
;
}
...
...
@@ -239,7 +239,7 @@ public async Task<ConflictResolution> ResolveConflictsAsync()
}
#if DEBUG
private
void
DebugVerifyNoErrors
(
ConflictResolution
conflictResolution
,
IEnumerable
<
DocumentId
>
documents
)
private
async
Task
DebugVerifyNoErrorsAsync
(
ConflictResolution
conflictResolution
,
IEnumerable
<
DocumentId
>
documents
)
{
var
documentIdErrorStateLookup
=
new
Dictionary
<
DocumentId
,
bool
>();
...
...
@@ -249,7 +249,7 @@ private void DebugVerifyNoErrors(ConflictResolution conflictResolution, IEnumera
{
// remember if there were issues in the document prior to renaming it.
var
originalDoc
=
conflictResolution
.
OldSolution
.
GetDocument
(
documentId
);
documentIdErrorStateLookup
.
Add
(
documentId
,
originalDoc
.
HasAnyErrors
(
_cancellationToken
).
WaitAndGetResult
(
_cancellationToken
));
documentIdErrorStateLookup
.
Add
(
documentId
,
await
originalDoc
.
HasAnyErrorsAsync
(
_cancellationToken
).
ConfigureAwait
(
false
));
}
// We want to ignore few error message introduced by rename because the user is wantedly doing it.
...
...
@@ -268,7 +268,7 @@ private void DebugVerifyNoErrors(ConflictResolution conflictResolution, IEnumera
// errors.
if
(!
documentIdErrorStateLookup
[
documentId
]
&&
_hasConflictCallback
==
null
)
{
conflictResolution
.
NewSolution
.
GetDocument
(
documentId
).
VerifyNoErrorsAsync
(
"Rename introduced errors in error-free code"
,
_cancellationToken
,
ignoreErrorCodes
).
Wait
(
_cancellationToken
);
await
conflictResolution
.
NewSolution
.
GetDocument
(
documentId
).
VerifyNoErrorsAsync
(
"Rename introduced errors in error-free code"
,
_cancellationToken
,
ignoreErrorCodes
).
ConfigureAwait
(
false
);
}
}
}
...
...
src/Workspaces/Core/Portable/Shared/Extensions/DocumentExtensions.cs
浏览文件 @
33c6af15
...
...
@@ -105,7 +105,7 @@ public static Task<SemanticModel> GetSemanticModelForNodeAsync(this Document doc
}
#if DEBUG
public
static
async
Task
<
bool
>
HasAnyErrors
(
this
Document
document
,
CancellationToken
cancellationToken
,
List
<
string
>
ignoreErrorCode
=
null
)
public
static
async
Task
<
bool
>
HasAnyErrors
Async
(
this
Document
document
,
CancellationToken
cancellationToken
,
List
<
string
>
ignoreErrorCode
=
null
)
{
if
(!
document
.
SupportsSemanticModel
)
{
...
...
@@ -122,7 +122,7 @@ public static async Task<bool> HasAnyErrors(this Document document, Cancellation
/// </summary>
public
static
async
Task
VerifyNoErrorsAsync
(
this
Document
newDocument
,
string
message
,
CancellationToken
cancellationToken
,
List
<
string
>
ignoreErrorCodes
=
null
)
{
bool
newDocumentHasErrors
=
await
newDocument
.
HasAnyErrors
(
cancellationToken
,
ignoreErrorCodes
).
ConfigureAwait
(
false
);
bool
newDocumentHasErrors
=
await
newDocument
.
HasAnyErrors
Async
(
cancellationToken
,
ignoreErrorCodes
).
ConfigureAwait
(
false
);
Debug
.
Assert
(!
newDocumentHasErrors
,
message
);
}
#endif
...
...
src/Workspaces/Core/Portable/Simplification/AbstractSimplificationService.cs
浏览文件 @
33c6af15
...
...
@@ -59,7 +59,7 @@ public async Task<Document> ReduceAsync(Document document, IEnumerable<TextSpan>
var
root
=
semanticModel
.
SyntaxTree
.
GetRoot
(
cancellationToken
);
#if DEBUG
bool
originalDocHasErrors
=
await
document
.
HasAnyErrors
(
cancellationToken
).
ConfigureAwait
(
false
);
bool
originalDocHasErrors
=
await
document
.
HasAnyErrors
Async
(
cancellationToken
).
ConfigureAwait
(
false
);
#endif
var
reduced
=
await
this
.
ReduceAsyncInternal
(
document
,
spanList
,
optionSet
,
reducers
,
cancellationToken
).
ConfigureAwait
(
false
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录