Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
b9d1e62a
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,发现更多精彩内容 >>
提交
b9d1e62a
编写于
1月 22, 2020
作者:
I
Ivan Basov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more code review feedback
上级
cac0215a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
34 addition
and
35 deletion
+34
-35
src/Features/CSharp/Portable/ChangeSignature/CSharpChangeSignatureService.cs
.../Portable/ChangeSignature/CSharpChangeSignatureService.cs
+12
-12
src/Features/Core/Portable/ChangeSignature/AbstractChangeSignatureService.cs
...ortable/ChangeSignature/AbstractChangeSignatureService.cs
+1
-1
src/Features/VisualBasic/Portable/ChangeSignature/VisualBasicChangeSignatureService.vb
...able/ChangeSignature/VisualBasicChangeSignatureService.vb
+21
-22
未找到文件。
src/Features/CSharp/Portable/ChangeSignature/CSharpChangeSignatureService.cs
浏览文件 @
b9d1e62a
...
...
@@ -291,31 +291,31 @@ private SyntaxNode GetNodeContainingTargetNode(SyntaxNode matchingNode)
// Update declarations parameter lists
if
(
updatedNode
.
IsKind
(
SyntaxKind
.
MethodDeclaration
,
out
MethodDeclarationSyntax
method
))
{
var
updatedParameters
=
Permu
teDeclaration
(
method
.
ParameterList
.
Parameters
,
signaturePermutation
,
CreateNewParameterSyntax
);
var
updatedParameters
=
Upda
teDeclaration
(
method
.
ParameterList
.
Parameters
,
signaturePermutation
,
CreateNewParameterSyntax
);
return
method
.
WithParameterList
(
method
.
ParameterList
.
WithParameters
(
updatedParameters
).
WithAdditionalAnnotations
(
changeSignatureFormattingAnnotation
));
}
if
(
updatedNode
.
IsKind
(
SyntaxKind
.
LocalFunctionStatement
,
out
LocalFunctionStatementSyntax
localFunction
))
{
var
updatedParameters
=
Permu
teDeclaration
(
localFunction
.
ParameterList
.
Parameters
,
signaturePermutation
,
CreateNewParameterSyntax
);
var
updatedParameters
=
Upda
teDeclaration
(
localFunction
.
ParameterList
.
Parameters
,
signaturePermutation
,
CreateNewParameterSyntax
);
return
localFunction
.
WithParameterList
(
localFunction
.
ParameterList
.
WithParameters
(
updatedParameters
).
WithAdditionalAnnotations
(
changeSignatureFormattingAnnotation
));
}
if
(
updatedNode
.
IsKind
(
SyntaxKind
.
ConstructorDeclaration
,
out
ConstructorDeclarationSyntax
constructor
))
{
var
updatedParameters
=
Permu
teDeclaration
(
constructor
.
ParameterList
.
Parameters
,
signaturePermutation
,
CreateNewParameterSyntax
);
var
updatedParameters
=
Upda
teDeclaration
(
constructor
.
ParameterList
.
Parameters
,
signaturePermutation
,
CreateNewParameterSyntax
);
return
constructor
.
WithParameterList
(
constructor
.
ParameterList
.
WithParameters
(
updatedParameters
).
WithAdditionalAnnotations
(
changeSignatureFormattingAnnotation
));
}
if
(
updatedNode
.
IsKind
(
SyntaxKind
.
IndexerDeclaration
,
out
IndexerDeclarationSyntax
indexer
))
{
var
updatedParameters
=
Permu
teDeclaration
(
indexer
.
ParameterList
.
Parameters
,
signaturePermutation
,
CreateNewParameterSyntax
);
var
updatedParameters
=
Upda
teDeclaration
(
indexer
.
ParameterList
.
Parameters
,
signaturePermutation
,
CreateNewParameterSyntax
);
return
indexer
.
WithParameterList
(
indexer
.
ParameterList
.
WithParameters
(
updatedParameters
).
WithAdditionalAnnotations
(
changeSignatureFormattingAnnotation
));
}
if
(
updatedNode
.
IsKind
(
SyntaxKind
.
DelegateDeclaration
,
out
DelegateDeclarationSyntax
delegateDeclaration
))
{
var
updatedParameters
=
Permu
teDeclaration
(
delegateDeclaration
.
ParameterList
.
Parameters
,
signaturePermutation
,
CreateNewParameterSyntax
);
var
updatedParameters
=
Upda
teDeclaration
(
delegateDeclaration
.
ParameterList
.
Parameters
,
signaturePermutation
,
CreateNewParameterSyntax
);
return
delegateDeclaration
.
WithParameterList
(
delegateDeclaration
.
ParameterList
.
WithParameters
(
updatedParameters
).
WithAdditionalAnnotations
(
changeSignatureFormattingAnnotation
));
}
...
...
@@ -327,7 +327,7 @@ private SyntaxNode GetNodeContainingTargetNode(SyntaxNode matchingNode)
return
anonymousMethod
;
}
var
updatedParameters
=
Permu
teDeclaration
(
anonymousMethod
.
ParameterList
.
Parameters
,
signaturePermutation
,
CreateNewParameterSyntax
);
var
updatedParameters
=
Upda
teDeclaration
(
anonymousMethod
.
ParameterList
.
Parameters
,
signaturePermutation
,
CreateNewParameterSyntax
);
return
anonymousMethod
.
WithParameterList
(
anonymousMethod
.
ParameterList
.
WithParameters
(
updatedParameters
).
WithAdditionalAnnotations
(
changeSignatureFormattingAnnotation
));
}
...
...
@@ -335,7 +335,7 @@ private SyntaxNode GetNodeContainingTargetNode(SyntaxNode matchingNode)
{
if
(
signaturePermutation
.
UpdatedConfiguration
.
ToListOfParameters
().
Any
())
{
var
updatedParameters
=
Permu
teDeclaration
(
SyntaxFactory
.
SeparatedList
<
ParameterSyntax
>(
new
[]
{
lambda
.
Parameter
}),
signaturePermutation
,
CreateNewParameterSyntax
);
var
updatedParameters
=
Upda
teDeclaration
(
SyntaxFactory
.
SeparatedList
<
ParameterSyntax
>(
new
[]
{
lambda
.
Parameter
}),
signaturePermutation
,
CreateNewParameterSyntax
);
return
SyntaxFactory
.
ParenthesizedLambdaExpression
(
lambda
.
AsyncKeyword
,
SyntaxFactory
.
ParameterList
(
updatedParameters
),
...
...
@@ -359,7 +359,7 @@ private SyntaxNode GetNodeContainingTargetNode(SyntaxNode matchingNode)
Func
<
AddedParameter
,
ParameterSyntax
>
createNewParameterDelegate
=
p
=>
CreateNewParameterSyntax
(
p
,
!
doNotSkipParameterType
);
var
updatedParameters
=
Permu
teDeclaration
(
var
updatedParameters
=
Upda
teDeclaration
(
parenLambda
.
ParameterList
.
Parameters
,
signaturePermutation
,
createNewParameterDelegate
);
...
...
@@ -430,7 +430,7 @@ private SyntaxNode GetNodeContainingTargetNode(SyntaxNode matchingNode)
return
nameMemberCref
;
}
var
newParameters
=
Permu
teDeclaration
(
nameMemberCref
.
Parameters
.
Parameters
,
signaturePermutation
,
CreateNewCrefParameterSyntax
);
var
newParameters
=
Upda
teDeclaration
(
nameMemberCref
.
Parameters
.
Parameters
,
signaturePermutation
,
CreateNewCrefParameterSyntax
);
var
newCrefParameterList
=
nameMemberCref
.
Parameters
.
WithParameters
(
newParameters
);
return
nameMemberCref
.
WithParameters
(
newCrefParameterList
);
...
...
@@ -524,13 +524,13 @@ private static ParameterSyntax CreateNewParameterSyntax(AddedParameter addedPara
private
static
CrefParameterSyntax
CreateNewCrefParameterSyntax
(
AddedParameter
addedParameter
)
=>
SyntaxFactory
.
CrefParameter
(
type
:
SyntaxFactory
.
ParseTypeName
(
addedParameter
.
TypeName
)).
WithLeadingTrivia
(
SyntaxFactory
.
ElasticSpace
);
private
SeparatedSyntaxList
<
T
>
Permu
teDeclaration
<
T
>(
private
SeparatedSyntaxList
<
T
>
Upda
teDeclaration
<
T
>(
SeparatedSyntaxList
<
T
>
list
,
SignatureChange
updatedSignature
,
Func
<
AddedParameter
,
T
>
createNewParameterMethod
)
where
T
:
SyntaxNode
{
var
permuteDeclarationBase
=
base
.
Permu
teDeclarationBase
<
T
>(
list
,
updatedSignature
,
createNewParameterMethod
);
return
SyntaxFactory
.
SeparatedList
(
permuteDeclarationBase
.
parameters
,
permuteDeclarationBase
.
separators
);
var
updatedDeclaration
=
base
.
Upda
teDeclarationBase
<
T
>(
list
,
updatedSignature
,
createNewParameterMethod
);
return
SyntaxFactory
.
SeparatedList
(
updatedDeclaration
.
parameters
,
updatedDeclaration
.
separators
);
}
protected
override
T
TransferLeadingWhitespaceTrivia
<
T
>(
T
newArgument
,
SyntaxNode
oldArgument
)
...
...
src/Features/Core/Portable/ChangeSignature/AbstractChangeSignatureService.cs
浏览文件 @
b9d1e62a
...
...
@@ -649,7 +649,7 @@ protected static int GetParameterIndex<TNode>(SeparatedSyntaxList<TNode> paramet
return
parameters
.
Count
-
1
;
}
protected
(
IEnumerable
<
T
>
parameters
,
IEnumerable
<
SyntaxToken
>
separators
)
Permu
teDeclarationBase
<
T
>(
protected
(
IEnumerable
<
T
>
parameters
,
IEnumerable
<
SyntaxToken
>
separators
)
Upda
teDeclarationBase
<
T
>(
SeparatedSyntaxList
<
T
>
list
,
SignatureChange
updatedSignature
,
Func
<
AddedParameter
,
T
>
createNewParameterMethod
)
where
T
:
SyntaxNode
...
...
src/Features/VisualBasic/Portable/ChangeSignature/VisualBasicChangeSignatureService.vb
浏览文件 @
b9d1e62a
...
...
@@ -78,6 +78,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ChangeSignature
SyntaxKind
.
SubNewStatement
,
SyntaxKind
.
ConstructorBlock
)
Dim
s_createNewParameterSyntaxDelegate
As
Func
(
Of
AddedParameter
,
ParameterSyntax
)
=
AddressOf
CreateNewParameterSyntax
Dim
s_createNewCrefParameterSyntaxDelegate
As
Func
(
Of
AddedParameter
,
CrefSignaturePartSyntax
)
=
AddressOf
CreateNewCrefParameterSyntax
<
ImportingConstructor
>
Public
Sub
New
()
End
Sub
...
...
@@ -281,7 +284,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ChangeSignature
If
vbnode
.
IsKind
(
SyntaxKind
.
SubStatement
)
OrElse
vbnode
.
IsKind
(
SyntaxKind
.
FunctionStatement
)
Then
Dim
method
=
DirectCast
(
vbnode
,
MethodStatementSyntax
)
Dim
updatedParameters
=
PermuteDeclaration
(
method
.
ParameterList
.
Parameters
,
updatedSignature
,
Function
(
p
)
CreateNewParameterSyntax
(
p
)
)
Dim
updatedParameters
=
UpdateDeclaration
(
method
.
ParameterList
.
Parameters
,
updatedSignature
,
s_createNewParameterSyntaxDelegate
)
Return
method
.
WithParameterList
(
method
.
ParameterList
.
WithParameters
(
updatedParameters
).
WithAdditionalAnnotations
(
changeSignatureFormattingAnnotation
))
End
If
...
...
@@ -289,7 +292,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ChangeSignature
Dim
eventStatement
=
DirectCast
(
vbnode
,
EventStatementSyntax
)
If
eventStatement
.
ParameterList
IsNot
Nothing
Then
Dim
updatedParameters
=
PermuteDeclaration
(
eventStatement
.
ParameterList
.
Parameters
,
updatedSignature
,
Function
(
p
)
CreateNewParameterSyntax
(
p
)
)
Dim
updatedParameters
=
UpdateDeclaration
(
eventStatement
.
ParameterList
.
Parameters
,
updatedSignature
,
s_createNewParameterSyntaxDelegate
)
eventStatement
=
eventStatement
.
WithParameterList
(
eventStatement
.
ParameterList
.
WithParameters
(
updatedParameters
).
WithAdditionalAnnotations
(
changeSignatureFormattingAnnotation
))
End
If
...
...
@@ -300,14 +303,14 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ChangeSignature
Dim
eventBlock
=
DirectCast
(
vbnode
,
EventBlockSyntax
)
If
eventBlock
.
EventStatement
.
ParameterList
IsNot
Nothing
Then
Dim
updatedParameters
=
PermuteDeclaration
(
eventBlock
.
EventStatement
.
ParameterList
.
Parameters
,
updatedSignature
,
Function
(
p
)
CreateNewParameterSyntax
(
p
)
)
Dim
updatedParameters
=
UpdateDeclaration
(
eventBlock
.
EventStatement
.
ParameterList
.
Parameters
,
updatedSignature
,
s_createNewParameterSyntaxDelegate
)
Return
eventBlock
.
WithEventStatement
(
eventBlock
.
EventStatement
.
WithParameterList
(
eventBlock
.
EventStatement
.
ParameterList
.
WithParameters
(
updatedParameters
).
WithAdditionalAnnotations
(
changeSignatureFormattingAnnotation
)))
End
If
Dim
raiseEventAccessor
=
eventBlock
.
Accessors
.
FirstOrDefault
(
Function
(
a
)
a
.
IsKind
(
SyntaxKind
.
RaiseEventAccessorBlock
))
If
raiseEventAccessor
IsNot
Nothing
Then
If
raiseEventAccessor
.
BlockStatement
.
ParameterList
IsNot
Nothing
Then
Dim
updatedParameters
=
PermuteDeclaration
(
raiseEventAccessor
.
BlockStatement
.
ParameterList
.
Parameters
,
updatedSignature
,
Function
(
p
)
CreateNewParameterSyntax
(
p
)
)
Dim
updatedParameters
=
UpdateDeclaration
(
raiseEventAccessor
.
BlockStatement
.
ParameterList
.
Parameters
,
updatedSignature
,
s_createNewParameterSyntaxDelegate
)
Dim
updatedRaiseEventAccessor
=
raiseEventAccessor
.
WithAccessorStatement
(
raiseEventAccessor
.
AccessorStatement
.
WithParameterList
(
raiseEventAccessor
.
AccessorStatement
.
ParameterList
.
WithParameters
(
updatedParameters
).
WithAdditionalAnnotations
(
changeSignatureFormattingAnnotation
)))
eventBlock
=
eventBlock
.
WithAccessors
(
eventBlock
.
Accessors
.
Remove
(
raiseEventAccessor
).
Add
(
updatedRaiseEventAccessor
))
End
If
...
...
@@ -340,7 +343,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ChangeSignature
If
vbnode
.
IsKind
(
SyntaxKind
.
SubNewStatement
)
Then
Dim
constructor
=
DirectCast
(
vbnode
,
SubNewStatementSyntax
)
Dim
newParameters
=
PermuteDeclaration
(
constructor
.
ParameterList
.
Parameters
,
updatedSignature
,
Function
(
p
)
CreateNewParameterSyntax
(
p
)
)
Dim
newParameters
=
UpdateDeclaration
(
constructor
.
ParameterList
.
Parameters
,
updatedSignature
,
s_createNewParameterSyntaxDelegate
)
Return
constructor
.
WithParameterList
(
constructor
.
ParameterList
.
WithParameters
(
newParameters
).
WithAdditionalAnnotations
(
changeSignatureFormattingAnnotation
))
End
If
...
...
@@ -368,7 +371,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ChangeSignature
If
vbnode
.
IsKind
(
SyntaxKind
.
PropertyStatement
)
Then
Dim
propertyStatement
=
DirectCast
(
vbnode
,
PropertyStatementSyntax
)
Dim
newParameters
=
PermuteDeclaration
(
propertyStatement
.
ParameterList
.
Parameters
,
updatedSignature
,
Function
(
p
)
CreateNewParameterSyntax
(
p
)
)
Dim
newParameters
=
UpdateDeclaration
(
propertyStatement
.
ParameterList
.
Parameters
,
updatedSignature
,
s_createNewParameterSyntaxDelegate
)
Return
propertyStatement
.
WithParameterList
(
propertyStatement
.
ParameterList
.
WithParameters
(
newParameters
).
WithAdditionalAnnotations
(
changeSignatureFormattingAnnotation
))
End
If
...
...
@@ -380,7 +383,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ChangeSignature
Return
crefReference
End
If
Dim
newParameters
=
PermuteDeclaration
(
crefReference
.
Signature
.
ArgumentTypes
,
updatedSignature
,
Function
(
p
)
CreateNewCrefParameterSyntax
(
p
)
)
Dim
newParameters
=
UpdateDeclaration
(
crefReference
.
Signature
.
ArgumentTypes
,
updatedSignature
,
s_createNewCrefParameterSyntaxDelegate
)
Return
crefReference
.
WithSignature
(
crefReference
.
Signature
.
WithArgumentTypes
(
newParameters
))
End
If
...
...
@@ -393,7 +396,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ChangeSignature
Return
vbnode
End
If
Dim
newParameters
=
PermuteDeclaration
(
lambda
.
SubOrFunctionHeader
.
ParameterList
.
Parameters
,
updatedSignature
,
Function
(
p
)
CreateNewParameterSyntax
(
p
)
)
Dim
newParameters
=
UpdateDeclaration
(
lambda
.
SubOrFunctionHeader
.
ParameterList
.
Parameters
,
updatedSignature
,
s_createNewParameterSyntaxDelegate
)
Dim
newBegin
=
lambda
.
SubOrFunctionHeader
.
WithParameterList
(
lambda
.
SubOrFunctionHeader
.
ParameterList
.
WithParameters
(
newParameters
).
WithAdditionalAnnotations
(
changeSignatureFormattingAnnotation
))
Return
lambda
.
WithSubOrFunctionHeader
(
newBegin
)
End
If
...
...
@@ -407,7 +410,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ChangeSignature
Return
vbnode
End
If
Dim
newParameters
=
PermuteDeclaration
(
lambda
.
SubOrFunctionHeader
.
ParameterList
.
Parameters
,
updatedSignature
,
Function
(
p
)
CreateNewParameterSyntax
(
p
)
)
Dim
newParameters
=
UpdateDeclaration
(
lambda
.
SubOrFunctionHeader
.
ParameterList
.
Parameters
,
updatedSignature
,
s_createNewParameterSyntaxDelegate
)
Dim
newBegin
=
lambda
.
SubOrFunctionHeader
.
WithParameterList
(
lambda
.
SubOrFunctionHeader
.
ParameterList
.
WithParameters
(
newParameters
).
WithAdditionalAnnotations
(
changeSignatureFormattingAnnotation
))
Return
lambda
.
WithSubOrFunctionHeader
(
newBegin
)
End
If
...
...
@@ -415,7 +418,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ChangeSignature
If
vbnode
.
IsKind
(
SyntaxKind
.
DelegateSubStatement
)
OrElse
vbnode
.
IsKind
(
SyntaxKind
.
DelegateFunctionStatement
)
Then
Dim
delegateStatement
=
DirectCast
(
vbnode
,
DelegateStatementSyntax
)
Dim
newParameters
=
PermuteDeclaration
(
delegateStatement
.
ParameterList
.
Parameters
,
updatedSignature
,
Function
(
p
)
CreateNewParameterSyntax
(
p
)
)
Dim
newParameters
=
UpdateDeclaration
(
delegateStatement
.
ParameterList
.
Parameters
,
updatedSignature
,
s_createNewParameterSyntaxDelegate
)
Return
delegateStatement
.
WithParameterList
(
delegateStatement
.
ParameterList
.
WithParameters
(
newParameters
).
WithAdditionalAnnotations
(
changeSignatureFormattingAnnotation
))
End
If
...
...
@@ -507,24 +510,20 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ChangeSignature
Return
SyntaxFactory
.
SeparatedList
(
newArguments
.
Select
(
Function
(
a
)
CType
(
DirectCast
(
a
,
UnifiedArgumentSyntax
),
ArgumentSyntax
)),
GetSeparators
(
arguments
,
numSeparatorsToSkip
))
End
Function
Private
Function
Permu
teDeclaration
(
Of
T
As
SyntaxNode
)(
parameterList
As
SeparatedSyntaxList
(
Of
T
),
updatedSignature
As
SignatureChange
,
createNewParameterMethod
As
Func
(
Of
AddedParameter
,
T
))
As
SeparatedSyntaxList
(
Of
T
)
Dim
basePermuteDeclaration
=
Permu
teDeclarationBase
(
parameterList
,
updatedSignature
,
createNewParameterMethod
)
Return
SyntaxFactory
.
SeparatedList
(
basePermuteDeclaration
.
parameters
,
basePermute
Declaration
.
separators
)
Private
Function
Upda
teDeclaration
(
Of
T
As
SyntaxNode
)(
parameterList
As
SeparatedSyntaxList
(
Of
T
),
updatedSignature
As
SignatureChange
,
createNewParameterMethod
As
Func
(
Of
AddedParameter
,
T
))
As
SeparatedSyntaxList
(
Of
T
)
Dim
updatedDeclaration
=
Upda
teDeclarationBase
(
parameterList
,
updatedSignature
,
createNewParameterMethod
)
Return
SyntaxFactory
.
SeparatedList
(
updatedDeclaration
.
parameters
,
updated
Declaration
.
separators
)
End
Function
Private
Shared
Function
CreateNewParameterSyntax
(
addedParameter
As
AddedParameter
)
As
ParameterSyntax
Return
CreateNewParameterSyntax
(
addedParameter
,
skipType
:
=
False
)
End
Function
Private
Shared
Function
CreateNewParameterSyntax
(
addedParameter
As
AddedParameter
,
skipType
As
Boolean
)
As
ParameterSyntax
Return
SyntaxFactory
.
Parameter
(
attributeLists
:
=
SyntaxFactory
.
List
(
Of
AttributeListSyntax
)(),
modifiers
:
=
SyntaxFactory
.
TokenList
(),
identifier
:
=
SyntaxFactory
.
ModifiedIdentifier
(
addedParameter
.
ParameterName
),
asClause
:
=
SyntaxFactory
.
SimpleAsClause
(
If
(
skipType
,
Nothing
,
SyntaxFactory
.
ParseTypeName
(
addedParameter
.
TypeName
).
WithTrailingTrivia
(
SyntaxFactory
.
ElasticSpace
)
)),
asClause
:
=
SyntaxFactory
.
SimpleAsClause
(
SyntaxFactory
.
ParseTypeName
(
addedParameter
.
TypeName
).
WithTrailingTrivia
(
SyntaxFactory
.
ElasticSpace
)),
[
default
]
:
=
Nothing
)
End
Function
...
...
@@ -667,7 +666,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ChangeSignature
SyntaxFactory
.
List
(
extraNodeList
.
AsEnumerable
()))
extraDocComments
=
extraDocComments
.
WithLeadingTrivia
(
SyntaxFactory
.
DocumentationCommentExteriorTrivia
(
"''' "
)).
WithTrailingTrivia
(
node
.
GetTrailingTrivia
()).
WithTrailingTrivia
(
SyntaxFactory
.
EndOfLine
(
document
.
Project
.
Solution
.
Workspace
.
Options
.
GetOption
(
FormattingOptions
.
NewLine
,
LanguageNames
.
CSharp
)),
WithTrailingTrivia
(
SyntaxFactory
.
EndOfLine
(
document
.
Project
.
Solution
.
Workspace
.
Options
.
GetOption
(
FormattingOptions
.
NewLine
,
LanguageNames
.
VisualBasic
)),
lastWhiteSpaceTrivia
)
Dim
newTrivia
=
SyntaxFactory
.
Trivia
(
extraDocComments
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录