Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
1fcb4464
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,发现更多精彩内容 >>
提交
1fcb4464
编写于
3月 26, 2020
作者:
C
Cyrus Najmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove parameters
上级
1bbda3e6
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
16 addition
and
32 deletion
+16
-32
src/Features/CSharp/Portable/SignatureHelp/AbstractOrdinaryMethodSignatureHelpProvider.cs
...natureHelp/AbstractOrdinaryMethodSignatureHelpProvider.cs
+1
-2
src/Features/CSharp/Portable/SignatureHelp/ConstructorInitializerSignatureHelpProvider.cs
...natureHelp/ConstructorInitializerSignatureHelpProvider.cs
+3
-6
src/Features/CSharp/Portable/SignatureHelp/ElementAccessExpressionSignatureHelpProvider.cs
...atureHelp/ElementAccessExpressionSignatureHelpProvider.cs
+7
-16
src/Features/CSharp/Portable/SignatureHelp/InitializerExpressionSignatureHelpProvider.cs
...gnatureHelp/InitializerExpressionSignatureHelpProvider.cs
+1
-1
src/Features/CSharp/Portable/SignatureHelp/InvocationExpressionSignatureHelpProviderBase_MethodGroup.cs
...ocationExpressionSignatureHelpProviderBase_MethodGroup.cs
+1
-1
src/Features/CSharp/Portable/SignatureHelp/ObjectCreationExpressionSignatureHelpProvider_NormalType.cs
...jectCreationExpressionSignatureHelpProvider_NormalType.cs
+3
-6
未找到文件。
src/Features/CSharp/Portable/SignatureHelp/AbstractOrdinaryMethodSignatureHelpProvider.cs
浏览文件 @
1fcb4464
...
...
@@ -19,8 +19,7 @@ internal abstract class AbstractOrdinaryMethodSignatureHelpProvider : AbstractCS
Document
document
,
IMethodSymbol
method
,
int
position
,
SemanticModel
semanticModel
,
CancellationToken
cancellationToken
)
SemanticModel
semanticModel
)
{
return
ConvertMethodGroupMethod
(
document
,
method
,
position
,
semanticModel
,
descriptionParts
:
null
);
}
...
...
src/Features/CSharp/Portable/SignatureHelp/ConstructorInitializerSignatureHelpProvider.cs
浏览文件 @
1fcb4464
...
...
@@ -142,7 +142,7 @@ public override SignatureHelpState GetCurrentArgumentState(SyntaxNode root, int
constructor
.
GetDocumentationPartsFactory
(
semanticModel
,
position
,
documentationCommentFormattingService
),
GetPreambleParts
(
constructor
,
semanticModel
,
position
),
GetSeparatorParts
(),
GetPostambleParts
(
constructor
),
GetPostambleParts
(),
constructor
.
Parameters
.
Select
(
p
=>
Convert
(
p
,
semanticModel
,
position
,
documentationCommentFormattingService
)).
ToList
());
return
item
;
}
...
...
@@ -160,10 +160,7 @@ public override SignatureHelpState GetCurrentArgumentState(SyntaxNode root, int
return
result
;
}
private
IList
<
SymbolDisplayPart
>
GetPostambleParts
(
IMethodSymbol
method
)
{
return
SpecializedCollections
.
SingletonList
(
Punctuation
(
SyntaxKind
.
CloseParenToken
));
}
private
IList
<
SymbolDisplayPart
>
GetPostambleParts
()
=>
SpecializedCollections
.
SingletonList
(
Punctuation
(
SyntaxKind
.
CloseParenToken
));
}
}
src/Features/CSharp/Portable/SignatureHelp/ElementAccessExpressionSignatureHelpProvider.cs
浏览文件 @
1fcb4464
...
...
@@ -118,14 +118,9 @@ private TextSpan GetTextSpan(ExpressionSyntax expression, SyntaxToken openBracke
{
if
(
openBracket
.
Parent
is
BracketedArgumentListSyntax
)
{
if
(
expression
.
Parent
is
ConditionalAccessExpressionSyntax
conditional
)
{
return
TextSpan
.
FromBounds
(
conditional
.
Span
.
Start
,
openBracket
.
FullSpan
.
End
);
}
else
{
return
CompleteElementAccessExpression
.
GetTextSpan
(
expression
,
openBracket
);
}
return
expression
.
Parent
is
ConditionalAccessExpressionSyntax
conditional
?
TextSpan
.
FromBounds
(
conditional
.
Span
.
Start
,
openBracket
.
FullSpan
.
End
)
:
CompleteElementAccessExpression
.
GetTextSpan
(
openBracket
);
}
else
if
(
openBracket
.
Parent
is
ArrayRankSpecifierSyntax
)
{
...
...
@@ -160,7 +155,6 @@ public override SignatureHelpState GetCurrentArgumentState(SyntaxNode root, int
if
(
expression
.
Parent
is
ConditionalAccessExpressionSyntax
)
{
// The typed code looks like: <expression>?[
var
conditional
=
(
ConditionalAccessExpressionSyntax
)
expression
.
Parent
;
var
elementBinding
=
SyntaxFactory
.
ElementBindingExpression
(
newBracketedArgumentList
);
var
conditionalAccessExpression
=
SyntaxFactory
.
ConditionalAccessExpression
(
expression
,
elementBinding
);
offset
=
expression
.
SpanStart
-
conditionalAccessExpression
.
SpanStart
;
...
...
@@ -240,7 +234,7 @@ public override SignatureHelpState GetCurrentArgumentState(SyntaxNode root, int
indexer
.
GetDocumentationPartsFactory
(
semanticModel
,
position
,
documentationCommentFormattingService
),
GetPreambleParts
(
indexer
,
position
,
semanticModel
),
GetSeparatorParts
(),
GetPostambleParts
(
indexer
),
GetPostambleParts
(),
indexer
.
Parameters
.
Select
(
p
=>
Convert
(
p
,
semanticModel
,
position
,
documentationCommentFormattingService
)).
ToList
());
return
item
;
}
...
...
@@ -280,11 +274,8 @@ public override SignatureHelpState GetCurrentArgumentState(SyntaxNode root, int
return
result
;
}
private
IList
<
SymbolDisplayPart
>
GetPostambleParts
(
IPropertySymbol
indexer
)
{
return
SpecializedCollections
.
SingletonList
(
Punctuation
(
SyntaxKind
.
CloseBracketToken
));
}
private
IList
<
SymbolDisplayPart
>
GetPostambleParts
()
=>
SpecializedCollections
.
SingletonList
(
Punctuation
(
SyntaxKind
.
CloseBracketToken
));
private
static
class
CompleteElementAccessExpression
{
...
...
@@ -303,7 +294,7 @@ internal static bool IsArgumentListToken(ElementAccessExpressionSyntax expressio
token
!=
expression
.
ArgumentList
.
CloseBracketToken
;
}
internal
static
TextSpan
GetTextSpan
(
Syntax
Node
expression
,
Syntax
Token
openBracket
)
internal
static
TextSpan
GetTextSpan
(
SyntaxToken
openBracket
)
{
Contract
.
ThrowIfFalse
(
openBracket
.
Parent
is
BracketedArgumentListSyntax
&&
(
openBracket
.
Parent
.
Parent
is
ElementAccessExpressionSyntax
||
openBracket
.
Parent
.
Parent
is
ElementBindingExpressionSyntax
));
...
...
src/Features/CSharp/Portable/SignatureHelp/InitializerExpressionSignatureHelpProvider.cs
浏览文件 @
1fcb4464
...
...
@@ -61,7 +61,7 @@ protected override async Task<SignatureHelpItems> GetItemsWorkerAsync(Document d
var
semanticModel
=
await
document
.
GetSemanticModelAsync
(
cancellationToken
).
ConfigureAwait
(
false
);
return
CreateCollectionInitializerSignatureHelpItems
(
addMethods
.
Select
(
s
=>
ConvertMethodGroupMethod
(
document
,
s
,
initializerExpression
.
OpenBraceToken
.
SpanStart
,
semanticModel
,
cancellationToken
)).
ToList
(),
ConvertMethodGroupMethod
(
document
,
s
,
initializerExpression
.
OpenBraceToken
.
SpanStart
,
semanticModel
)).
ToList
(),
textSpan
,
GetCurrentArgumentState
(
root
,
position
,
syntaxFacts
,
textSpan
,
cancellationToken
));
}
...
...
src/Features/CSharp/Portable/SignatureHelp/InvocationExpressionSignatureHelpProviderBase_MethodGroup.cs
浏览文件 @
1fcb4464
...
...
@@ -26,7 +26,7 @@ internal partial class InvocationExpressionSignatureHelpProviderBase
CancellationToken
cancellationToken
)
{
return
Task
.
FromResult
(
(
accessibleMethods
.
SelectAsArray
(
m
=>
ConvertMethodGroupMethod
(
document
,
m
,
invocationExpression
.
SpanStart
,
semanticModel
,
cancellationToken
)),
(
accessibleMethods
.
SelectAsArray
(
m
=>
ConvertMethodGroupMethod
(
document
,
m
,
invocationExpression
.
SpanStart
,
semanticModel
)),
TryGetSelectedIndex
(
accessibleMethods
,
currentSymbol
)));
}
...
...
src/Features/CSharp/Portable/SignatureHelp/ObjectCreationExpressionSignatureHelpProvider_NormalType.cs
浏览文件 @
1fcb4464
...
...
@@ -58,7 +58,7 @@ internal partial class ObjectCreationExpressionSignatureHelpProvider
constructor
.
GetDocumentationPartsFactory
(
semanticModel
,
position
,
documentationCommentFormattingService
),
GetNormalTypePreambleParts
(
constructor
,
semanticModel
,
position
),
GetSeparatorParts
(),
GetNormalTypePostambleParts
(
constructor
),
GetNormalTypePostambleParts
(),
constructor
.
Parameters
.
Select
(
p
=>
Convert
(
p
,
semanticModel
,
position
,
documentationCommentFormattingService
)).
ToList
());
return
item
;
...
...
@@ -77,10 +77,7 @@ internal partial class ObjectCreationExpressionSignatureHelpProvider
return
result
;
}
private
IList
<
SymbolDisplayPart
>
GetNormalTypePostambleParts
(
IMethodSymbol
method
)
{
return
SpecializedCollections
.
SingletonList
(
Punctuation
(
SyntaxKind
.
CloseParenToken
));
}
private
IList
<
SymbolDisplayPart
>
GetNormalTypePostambleParts
()
=>
SpecializedCollections
.
SingletonList
(
Punctuation
(
SyntaxKind
.
CloseParenToken
));
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录