Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
e4d788ef
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,发现更多精彩内容 >>
提交
e4d788ef
编写于
4月 03, 2020
作者:
C
Cyrus Najmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove origina name parameter. it's redundant.
上级
fe728891
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
6 addition
and
11 deletion
+6
-11
src/EditorFeatures/Core.Wpf/InlineRename/AbstractEditorInlineRenameService.InlineRenameLocationSet.cs
...tractEditorInlineRenameService.InlineRenameLocationSet.cs
+2
-2
src/EditorFeatures/Test2/Rename/RenameEngineResult.vb
src/EditorFeatures/Test2/Rename/RenameEngineResult.vb
+1
-1
src/Workspaces/Core/Portable/Rename/ConflictEngine/ConflictResolver.Session.cs
...ortable/Rename/ConflictEngine/ConflictResolver.Session.cs
+1
-2
src/Workspaces/Core/Portable/Rename/ConflictEngine/ConflictResolver.cs
...s/Core/Portable/Rename/ConflictEngine/ConflictResolver.cs
+1
-4
src/Workspaces/Core/Portable/Rename/Renamer.cs
src/Workspaces/Core/Portable/Rename/Renamer.cs
+1
-2
未找到文件。
src/EditorFeatures/Core.Wpf/InlineRename/AbstractEditorInlineRenameService.InlineRenameLocationSet.cs
浏览文件 @
e4d788ef
...
...
@@ -40,8 +40,8 @@ private InlineRenameLocation ConvertLocation(RenameLocation location)
public
async
Task
<
IInlineRenameReplacementInfo
>
GetReplacementsAsync
(
string
replacementText
,
OptionSet
optionSet
,
CancellationToken
cancellationToken
)
{
var
conflicts
=
await
ConflictResolver
.
ResolveConflictsAsync
(
_renameLocationSet
,
_rename
LocationSet
.
Symbol
.
Name
,
_renameInfo
.
GetFinalSymbolName
(
replacementText
),
nonConflictSymbols
:
null
,
cancellationToken
:
cancellationToken
).
ConfigureAwait
(
false
);
_renameLocationSet
,
_rename
Info
.
GetFinalSymbolName
(
replacementText
)
,
nonConflictSymbols
:
null
,
cancellationToken
:
cancellationToken
).
ConfigureAwait
(
false
);
return
new
InlineRenameReplacementInfo
(
conflicts
);
}
...
...
src/EditorFeatures/Test2/Rename/RenameEngineResult.vb
浏览文件 @
e4d788ef
...
...
@@ -79,7 +79,7 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests.Rename
Dim
locations
=
RenameLocations
.
FindAsync
(
symbolAndProjectId
,
workspace
.
CurrentSolution
,
optionSet
,
CancellationToken
.
None
).
Result
Dim
originalName
=
symbol
.
Name
.
Split
(
"."
c
).
Last
()
Dim
result
=
ConflictResolver
.
ResolveConflictsAsync
(
locations
,
originalName
,
renameTo
,
nonConflictSymbols
:
=
Nothing
,
cancellationToken
:
=
CancellationToken
.
None
).
Result
Dim
result
=
ConflictResolver
.
ResolveConflictsAsync
(
locations
,
renameTo
,
nonConflictSymbols
:
=
Nothing
,
cancellationToken
:
=
CancellationToken
.
None
).
Result
engineResult
=
New
RenameEngineResult
(
workspace
,
result
,
renameTo
)
engineResult
.
AssertUnlabeledSpansRenamedAndHaveNoConflicts
()
...
...
src/Workspaces/Core/Portable/Rename/ConflictEngine/ConflictResolver.Session.cs
浏览文件 @
e4d788ef
...
...
@@ -56,14 +56,13 @@ private class Session
public
Session
(
RenameLocations
renameLocationSet
,
Location
renameSymbolDeclarationLocation
,
string
originalText
,
string
replacementText
,
ImmutableHashSet
<
ISymbol
>
nonConflictSymbols
,
CancellationToken
cancellationToken
)
{
_renameLocationSet
=
renameLocationSet
;
_renameSymbolDeclarationLocation
=
renameSymbolDeclarationLocation
;
_originalText
=
originalText
;
_originalText
=
renameLocationSet
.
Symbol
.
Name
;
_replacementText
=
replacementText
;
_optionSet
=
renameLocationSet
.
Options
;
_nonConflictSymbols
=
nonConflictSymbols
;
...
...
src/Workspaces/Core/Portable/Rename/ConflictEngine/ConflictResolver.cs
浏览文件 @
e4d788ef
...
...
@@ -41,7 +41,6 @@ internal static partial class ConflictResolver
/// resolves them where possible.
/// </summary>
/// <param name="renameLocationSet">The locations to perform the renaming at.</param>
/// <param name="originalText">The original name of the identifier.</param>
/// <param name="replacementText">The new name of the identifier</param>
/// <param name="nonConflictSymbols">Used after renaming references. References that now bind to any of these
/// symbols are not considered to be in conflict. Useful for features that want to rename existing references to
...
...
@@ -51,7 +50,6 @@ internal static partial class ConflictResolver
/// <returns>A conflict resolution containing the new solution.</returns>
public
static
Task
<
ConflictResolution
>
ResolveConflictsAsync
(
RenameLocations
renameLocationSet
,
string
originalText
,
string
replacementText
,
ImmutableHashSet
<
ISymbol
>
nonConflictSymbols
,
CancellationToken
cancellationToken
)
...
...
@@ -68,8 +66,7 @@ internal static partial class ConflictResolver
var
session
=
new
Session
(
renameLocationSet
,
renameSymbolDeclarationLocation
,
originalText
,
replacementText
,
nonConflictSymbols
,
cancellationToken
);
replacementText
,
nonConflictSymbols
,
cancellationToken
);
return
session
.
ResolveConflictsAsync
();
}
...
...
src/Workspaces/Core/Portable/Rename/Renamer.cs
浏览文件 @
e4d788ef
...
...
@@ -61,8 +61,7 @@ public static class Renamer
cancellationToken
.
ThrowIfCancellationRequested
();
var
conflictResolution
=
await
ConflictResolver
.
ResolveConflictsAsync
(
locations
,
locations
.
SymbolAndProjectId
.
Symbol
.
Name
,
newName
,
nonConflictSymbols
,
cancellationToken
).
ConfigureAwait
(
false
);
locations
,
newName
,
nonConflictSymbols
,
cancellationToken
).
ConfigureAwait
(
false
);
return
conflictResolution
.
NewSolution
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录