Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
c0e34cd0
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,发现更多精彩内容 >>
提交
c0e34cd0
编写于
4月 01, 2019
作者:
D
David Barbet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename async toggle block comment method.
上级
28bbe350
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
5 addition
and
6 deletion
+5
-6
src/EditorFeatures/Core/Implementation/CommentSelection/AbstractCommentSelectionBase.cs
...entation/CommentSelection/AbstractCommentSelectionBase.cs
+2
-3
src/EditorFeatures/Core/Implementation/CommentSelection/AbstractToggleBlockCommentBase.cs
...tation/CommentSelection/AbstractToggleBlockCommentBase.cs
+1
-1
src/EditorFeatures/Core/Implementation/CommentSelection/CommentUncommentSelectionCommandHandler.cs
...mmentSelection/CommentUncommentSelectionCommandHandler.cs
+1
-1
src/EditorFeatures/Test/CommentSelection/CommentUncommentSelectionCommandHandlerTests.cs
...Selection/CommentUncommentSelectionCommandHandlerTests.cs
+1
-1
未找到文件。
src/EditorFeatures/Core/Implementation/CommentSelection/AbstractCommentSelectionBase.cs
浏览文件 @
c0e34cd0
...
...
@@ -56,7 +56,7 @@ internal abstract class AbstractCommentSelectionBase<TCommand>
protected
abstract
string
GetMessage
(
TCommand
command
);
// Internal as tests currently rely on this method.
internal
abstract
Task
<
CommentSelectionResult
>
CollectEdits
(
internal
abstract
Task
<
CommentSelectionResult
>
CollectEdits
Async
(
Document
document
,
ICommentSelectionService
service
,
ITextBuffer
textBuffer
,
NormalizedSnapshotSpanCollection
selectedSpans
,
TCommand
command
,
CancellationToken
cancellationToken
);
...
...
@@ -104,7 +104,7 @@ internal bool ExecuteCommand(ITextView textView, ITextBuffer subjectBuffer, TCom
return
true
;
}
var
edits
=
CollectEdits
(
document
,
service
,
subjectBuffer
,
selectedSpans
,
command
,
cancellationToken
).
WaitAndGetResult
(
cancellationToken
);
var
edits
=
CollectEdits
Async
(
document
,
service
,
subjectBuffer
,
selectedSpans
,
command
,
cancellationToken
).
WaitAndGetResult
(
cancellationToken
);
ApplyEdits
(
document
,
textView
,
subjectBuffer
,
service
,
title
,
edits
);
}
...
...
@@ -169,7 +169,6 @@ internal static ITrackingSpan CreateTrackingSpan(Operation operation, ITextSnaps
/// <summary>
/// Retrieves the snapshot span from a post edited tracking span.
/// Additionally applies any extra modifications to the tracking span post edit.
/// Internal for tests.
/// </summary>
private
static
SnapshotSpan
CreateSnapshotSpan
(
ITextSnapshot
snapshot
,
ITrackingSpan
trackingSpan
,
CommentTrackingSpan
originalSpan
)
{
...
...
src/EditorFeatures/Core/Implementation/CommentSelection/AbstractToggleBlockCommentBase.cs
浏览文件 @
c0e34cd0
...
...
@@ -71,7 +71,7 @@ public bool ExecuteCommand(ToggleBlockCommentCommandArgs args, CommandExecutionC
protected
override
string
GetMessage
(
ValueTuple
command
)
=>
EditorFeaturesResources
.
Toggling_block_comment
;
internal
async
override
Task
<
CommentSelectionResult
>
CollectEdits
(
Document
document
,
ICommentSelectionService
service
,
internal
async
override
Task
<
CommentSelectionResult
>
CollectEdits
Async
(
Document
document
,
ICommentSelectionService
service
,
ITextBuffer
subjectBuffer
,
NormalizedSnapshotSpanCollection
selectedSpans
,
ValueTuple
command
,
CancellationToken
cancellationToken
)
{
var
experimentationService
=
document
.
Project
.
Solution
.
Workspace
.
Services
.
GetRequiredService
<
IExperimentationService
>();
...
...
src/EditorFeatures/Core/Implementation/CommentSelection/CommentUncommentSelectionCommandHandler.cs
浏览文件 @
c0e34cd0
...
...
@@ -80,7 +80,7 @@ public bool ExecuteCommand(UncommentSelectionCommandArgs args, CommandExecutionC
///
/// Internal so that it can be called by unit tests.
/// </summary>
internal
override
Task
<
CommentSelectionResult
>
CollectEdits
(
internal
override
Task
<
CommentSelectionResult
>
CollectEdits
Async
(
Document
document
,
ICommentSelectionService
service
,
ITextBuffer
subjectBuffer
,
NormalizedSnapshotSpanCollection
selectedSpans
,
Operation
operation
,
CancellationToken
cancellationToken
)
{
...
...
src/EditorFeatures/Test/CommentSelection/CommentUncommentSelectionCommandHandlerTests.cs
浏览文件 @
c0e34cd0
...
...
@@ -767,7 +767,7 @@ private static void CommentSelection(ITextView textView, IEnumerable<TextChange>
var
commandHandler
=
new
CommentUncommentSelectionCommandHandler
(
textUndoHistoryRegistry
,
editorOperationsFactory
);
var
service
=
new
MockCommentSelectionService
(
supportBlockComments
);
var
edits
=
commandHandler
.
CollectEdits
(
var
edits
=
commandHandler
.
CollectEdits
Async
(
null
,
service
,
textView
.
TextBuffer
,
textView
.
Selection
.
GetSnapshotSpansOnBuffer
(
textView
.
TextBuffer
),
operation
,
CancellationToken
.
None
).
GetAwaiter
().
GetResult
();
Roslyn
.
Test
.
Utilities
.
AssertEx
.
SetEqual
(
expectedChanges
,
edits
.
TextChanges
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录