Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
4277d623
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,发现更多精彩内容 >>
提交
4277d623
编写于
1月 11, 2020
作者:
A
Allison Chou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Restricted user input and fixed VB delegate bug.
上级
230f31db
变更
25
隐藏空白更改
内联
并排
Showing
25 changed file
with
362 addition
and
21 deletion
+362
-21
src/EditorFeatures/CSharpTest/ChangeSignature/AddParameterTests.Delegates.cs
...CSharpTest/ChangeSignature/AddParameterTests.Delegates.cs
+47
-0
src/Features/VisualBasic/Portable/ChangeSignature/VisualBasicChangeSignatureService.vb
...able/ChangeSignature/VisualBasicChangeSignatureService.vb
+11
-5
src/VisualStudio/CSharp/Impl/ChangeSignature/CSharpChangeSignatureLanguageService.cs
...l/ChangeSignature/CSharpChangeSignatureLanguageService.cs
+7
-3
src/VisualStudio/Core/Def/Implementation/ChangeSignature/AbstractChangeSignatureLanguageService.cs
...ChangeSignature/AbstractChangeSignatureLanguageService.cs
+2
-0
src/VisualStudio/Core/Def/Implementation/ChangeSignature/AddParameterDialog.xaml.cs
...Implementation/ChangeSignature/AddParameterDialog.xaml.cs
+10
-4
src/VisualStudio/Core/Def/Implementation/ChangeSignature/AddParameterDialogViewModel.cs
...ementation/ChangeSignature/AddParameterDialogViewModel.cs
+29
-2
src/VisualStudio/Core/Def/Implementation/ChangeSignature/ChangeSignatureLanguageService.cs
...ntation/ChangeSignature/ChangeSignatureLanguageService.cs
+12
-2
src/VisualStudio/Core/Def/Implementation/ChangeSignature/IChangeSignatureLanguageService.cs
...tation/ChangeSignature/IChangeSignatureLanguageService.cs
+3
-0
src/VisualStudio/Core/Def/Implementation/ChangeSignature/VisualStudioChangeSignatureOptionsService.cs
...ngeSignature/VisualStudioChangeSignatureOptionsService.cs
+1
-1
src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs
src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs
+27
-0
src/VisualStudio/Core/Def/ServicesVSResources.resx
src/VisualStudio/Core/Def/ServicesVSResources.resx
+9
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf
+15
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf
+15
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf
+15
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf
+15
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf
+15
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf
+15
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf
+15
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf
+15
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf
+15
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf
+15
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf
+15
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf
...VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf
+15
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf
...VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf
+15
-0
src/VisualStudio/VisualBasic/Impl/ChangeSignature/VisualBasicChangeSignatureLanguageService.vb
...ngeSignature/VisualBasicChangeSignatureLanguageService.vb
+9
-4
未找到文件。
src/EditorFeatures/CSharpTest/ChangeSignature/AddParameterTests.Delegates.cs
浏览文件 @
4277d623
...
...
@@ -845,6 +845,53 @@ void B()
C2<D2>.D d = new C2<D2>.D(M);
d(12345);
}
}"
;
await
TestChangeSignatureViaCommandAsync
(
LanguageNames
.
CSharp
,
markup
,
updatedSignature
:
updatedSignature
,
expectedUpdatedInvocationDocumentCode
:
expectedUpdatedCode
);
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
ChangeSignature
)]
public
async
Task
TestAddParameter_Delegates_Relaxation_ParameterlessFunctionToFunction
()
{
var
markup
=
@"
class C0
{
delegate int $$MyFunc(int x, string y, bool z);
class C
{
public void M()
{
MyFunc f = Test();
}
private MyFunc Test()
{
return null;
}
}
}"
;
var
updatedSignature
=
new
[]
{
new
AddedParameterOrExistingIndex
(
2
),
new
AddedParameterOrExistingIndex
(
new
AddedParameter
(
"int"
,
"newIntegerParameter"
,
"12345"
)),
new
AddedParameterOrExistingIndex
(
1
)
};
var
expectedUpdatedCode
=
@"
class C0
{
delegate int MyFunc(bool z, int newIntegerParameter, string y);
class C
{
public void M()
{
MyFunc f = Test();
}
private MyFunc Test()
{
return null;
}
}
}"
;
await
TestChangeSignatureViaCommandAsync
(
LanguageNames
.
CSharp
,
markup
,
updatedSignature
:
updatedSignature
,
expectedUpdatedInvocationDocumentCode
:
expectedUpdatedCode
);
}
...
...
src/Features/VisualBasic/Portable/ChangeSignature/VisualBasicChangeSignatureService.vb
浏览文件 @
4277d623
...
...
@@ -432,11 +432,18 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ChangeSignature
End
Function
Private
Function
PermuteDeclaration
(
Of
T
As
SyntaxNode
)(
l
ist
As
SeparatedSyntaxList
(
Of
T
),
parameterL
ist
As
SeparatedSyntaxList
(
Of
T
),
updatedSignature
As
SignatureChange
,
createNewParameterMethod
As
Func
(
Of
AddedParameter
,
T
))
As
SeparatedSyntaxList
(
Of
T
)
Dim
originalParameterSymbols
=
updatedSignature
.
OriginalConfiguration
.
ToListOfParameters
().
Select
(
Function
(
p
)
p
.
Symbol
).
ToArray
()
Dim
reorderedParameters
=
updatedSignature
.
UpdatedConfiguration
.
ToListOfParameters
()
Dim
numSeparatorsToSkip
=
originalParameterSymbols
.
Length
-
reorderedParameters
.
Count
' The parameter list could be empty if dealing with delegates.
If
parameterList
.
IsEmpty
()
Then
Return
SyntaxFactory
.
SeparatedList
(
parameterList
,
GetSeparators
(
parameterList
,
numSeparatorsToSkip
))
End
If
Dim
numAddedParameters
=
0
Dim
newParameters
=
New
List
(
Of
T
)
...
...
@@ -444,18 +451,17 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ChangeSignature
Dim
existingParam
=
TryCast
(
newParam
,
ExistingParameter
)
If
existingParam
IsNot
Nothing
Then
Dim
pos
=
originalParameterSymbols
.
IndexOf
(
existingParam
.
Symbol
)
Dim
param
=
l
ist
(
pos
)
Dim
param
=
parameterL
ist
(
pos
)
newParameters
.
Add
(
param
)
Else
' Added parameter
numAddedParameters
=
numAddedParameters
+
1
numAddedParameters
+=
1
Dim
newParameter
=
createNewParameterMethod
(
DirectCast
(
newParam
,
AddedParameter
))
newParameters
.
Add
(
newParameter
)
End
If
Next
Dim
numSeparatorsToSkip
=
originalParameterSymbols
.
Length
-
reorderedParameters
.
Count
Return
SyntaxFactory
.
SeparatedList
(
newParameters
,
GetSeparators
(
list
,
numSeparatorsToSkip
))
Return
SyntaxFactory
.
SeparatedList
(
newParameters
,
GetSeparators
(
parameterList
,
numSeparatorsToSkip
))
End
Function
Private
Shared
Function
CreateNewArgumentSyntax
(
addedParameter
As
AddedParameter
)
As
ArgumentSyntax
...
...
src/VisualStudio/CSharp/Impl/ChangeSignature/CSharpChangeSignatureLanguageService.cs
浏览文件 @
4277d623
...
...
@@ -3,6 +3,8 @@
using
System.Threading
;
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis
;
using
Microsoft.CodeAnalysis.CSharp
;
using
Microsoft.CodeAnalysis.CSharp.Syntax
;
using
Microsoft.CodeAnalysis.Host.Mef
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.ChangeSignature
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.IntellisenseControls
;
...
...
@@ -14,9 +16,9 @@
namespace
Microsoft.VisualStudio.LanguageServices.CSharp.ChangeSignature
{
[
ExportLanguageService
(
typeof
(
IChangeSignatureLanguageService
),
LanguageNames
.
CSharp
),
Shared
]
internal
class
CSharpChangeSignatureLanguageService
:
ChangeSignatureLanguageService
,
IChangeSignatureLanguageService
internal
class
CSharpChangeSignatureLanguageService
:
ChangeSignatureLanguageService
{
public
async
Task
<
IntellisenseTextBoxViewModel
[
]>
CreateViewModelsAsync
(
public
override
async
Task
<
IntellisenseTextBoxViewModel
[
]>
CreateViewModelsAsync
(
string
[]
rolesCollectionType
,
string
[]
rolesCollectionName
,
int
insertPosition
,
...
...
@@ -42,11 +44,13 @@ ITrackingSpan[] CreateTrackingSpans(IProjectionSnapshot snapshot)
}
}
public
void
GeneratePreviewGrammar
(
AddedParameterViewModel
addedParameterViewModel
,
List
<
SymbolDisplayPart
>
displayParts
)
public
override
void
GeneratePreviewGrammar
(
AddedParameterViewModel
addedParameterViewModel
,
List
<
SymbolDisplayPart
>
displayParts
)
{
displayParts
.
Add
(
new
SymbolDisplayPart
(
SymbolDisplayPartKind
.
Keyword
,
null
,
addedParameterViewModel
.
Type
));
displayParts
.
Add
(
new
SymbolDisplayPart
(
SymbolDisplayPartKind
.
Space
,
null
,
" "
));
displayParts
.
Add
(
new
SymbolDisplayPart
(
SymbolDisplayPartKind
.
ParameterName
,
null
,
addedParameterViewModel
.
Parameter
));
;
}
public
override
bool
IsTypeNameValid
(
string
typeName
)
=>
!
SyntaxFactory
.
ParseTypeName
(
typeName
).
ContainsDiagnostics
;
}
}
src/VisualStudio/Core/Def/Implementation/ChangeSignature/AbstractChangeSignatureLanguageService.cs
浏览文件 @
4277d623
...
...
@@ -2,6 +2,7 @@
using
System.Threading
;
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis
;
using
Microsoft.CodeAnalysis.CSharp.Syntax
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.IntellisenseControls
;
using
Microsoft.VisualStudio.Text
;
using
Microsoft.VisualStudio.Text.Projection
;
...
...
@@ -22,6 +23,7 @@ internal abstract class AbstractChangeSignatureLanguageService : IChangeSignatur
CancellationToken
cancellationToken
);
public
abstract
void
GeneratePreviewGrammar
(
ChangeSignatureDialogViewModel
.
AddedParameterViewModel
addedParameterViewModel
,
List
<
SymbolDisplayPart
>
displayParts
);
public
abstract
IContentType
GetContentType
(
IContentTypeRegistryService
contentTypeRegistryService
);
public
abstract
bool
IsTypeNameValid
(
string
typeName
);
protected
ITrackingSpan
[]
CreateTrackingSpansHelper
(
IProjectionSnapshot
snapshot
,
int
contextPoint
,
int
spaceBetweenTypeAndName
)
{
...
...
src/VisualStudio/Core/Def/Implementation/ChangeSignature/AddParameterDialog.xaml.cs
浏览文件 @
4277d623
...
...
@@ -5,6 +5,7 @@
using
Microsoft.VisualStudio.PlatformUI
;
using
Microsoft.VisualStudio.Text.Editor
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.IntellisenseControls
;
using
Microsoft.CodeAnalysis
;
using
Microsoft.CodeAnalysis.Notification
;
namespace
Microsoft.VisualStudio.LanguageServices.Implementation.ChangeSignature
...
...
@@ -17,6 +18,7 @@ internal partial class AddParameterDialog : DialogWindow
public
readonly
AddParameterDialogViewModel
ViewModel
;
private
readonly
IntellisenseTextBoxViewModel
_typeIntellisenseTextBoxView
;
private
readonly
IntellisenseTextBoxViewModel
_nameIntellisenseTextBoxView
;
private
readonly
Document
_document
;
public
string
OK
{
get
{
return
ServicesVSResources
.
OK
;
}
}
public
string
Cancel
{
get
{
return
ServicesVSResources
.
Cancel
;
}
}
...
...
@@ -32,13 +34,15 @@ internal partial class AddParameterDialog : DialogWindow
public
AddParameterDialog
(
IntellisenseTextBoxViewModel
typeIntellisenseTextBoxViewModel
,
IntellisenseTextBoxViewModel
nameIntellisenseTextBoxViewModel
,
INotificationService
notificationService
)
INotificationService
notificationService
,
Document
document
)
{
// The current implementation supports Add only.
// The dialog should be initialized the other way if called for Edit.
ViewModel
=
new
AddParameterDialogViewModel
(
notificationService
);
_typeIntellisenseTextBoxView
=
typeIntellisenseTextBoxViewModel
;
_nameIntellisenseTextBoxView
=
nameIntellisenseTextBoxViewModel
;
_document
=
document
;
this
.
Loaded
+=
AddParameterDialog_Loaded
;
DataContext
=
ViewModel
;
...
...
@@ -61,7 +65,7 @@ private void OK_Click(object sender, RoutedEventArgs e)
ViewModel
.
TypeName
=
((
IntellisenseTextBox
)
TypeContentControl
.
Content
).
Text
;
ViewModel
.
ParameterName
=
((
IntellisenseTextBox
)
NameContentControl
.
Content
).
Text
;
if
(
ViewModel
.
TrySubmit
())
if
(
ViewModel
.
TrySubmit
(
_document
))
{
DialogResult
=
true
;
}
...
...
@@ -94,9 +98,11 @@ private void TypeNameContentControl_PreviewKeyDown(object sender, KeyEventArgs e
{
// Do nothing. This case is handled in parent control KeyDown events.
}
else
if
(
typeNameTextBox
.
ContainerName
.
Equals
(
"NameContentControl"
)
&&
e
.
Key
==
Key
.
Space
)
else
if
(
e
.
Key
==
Key
.
Space
&&
(
typeNameTextBox
.
ContainerName
.
Equals
(
"NameContentControl"
)
||
(
typeNameTextBox
.
ContainerName
.
Equals
(
"TypeContentControl"
)
&&
_document
.
Project
.
Language
.
Equals
(
LanguageNames
.
CSharp
))))
{
// Do nothing. We disallow spaces in the name field for both C# and VB.
// Do nothing. We disallow spaces in the name field for both C# and VB
, and in the type field for C#
.
e
.
Handled
=
true
;
}
else
...
...
src/VisualStudio/Core/Def/Implementation/ChangeSignature/AddParameterDialogViewModel.cs
浏览文件 @
4277d623
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using
Microsoft.CodeAnalysis
;
using
Microsoft.CodeAnalysis.LanguageServices
;
using
Microsoft.CodeAnalysis.Notification
;
using
Microsoft.CodeAnalysis.Shared.Extensions
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.Utilities
;
namespace
Microsoft.VisualStudio.LanguageServices.Implementation.ChangeSignature
...
...
@@ -20,11 +23,23 @@ public AddParameterDialogViewModel(INotificationService notificationService)
public
string
TypeName
{
get
;
set
;
}
internal
bool
TrySubmit
()
internal
bool
TrySubmit
(
Document
document
)
{
if
(
string
.
IsNullOrEmpty
(
ParameterName
)
||
string
.
IsNullOrEmpty
(
TypeName
))
{
SendFailureNotification
(
"A type and name must be provided."
);
SendFailureNotification
(
ServicesVSResources
.
A_type_and_name_must_be_provided
);
return
false
;
}
if
(!
IsParameterTypeValid
(
TypeName
,
document
))
{
SendFailureNotification
(
ServicesVSResources
.
Parameter_type_contains_invalid_characters
);
return
false
;
}
if
(!
IsParameterNameValid
(
ParameterName
,
document
))
{
SendFailureNotification
(
ServicesVSResources
.
Parameter_name_contains_invalid_characters
);
return
false
;
}
...
...
@@ -35,5 +50,17 @@ private void SendFailureNotification(string message)
{
_notificationService
.
SendNotification
(
message
,
severity
:
NotificationSeverity
.
Information
);
}
private
bool
IsParameterTypeValid
(
string
typeName
,
Document
document
)
{
var
languageService
=
document
.
GetLanguageService
<
IChangeSignatureLanguageService
>();
return
languageService
.
IsTypeNameValid
(
typeName
);
}
private
bool
IsParameterNameValid
(
string
identifierName
,
Document
document
)
{
var
languageService
=
document
.
GetLanguageService
<
ISyntaxFactsService
>();
return
languageService
.
IsValidIdentifier
(
identifierName
);
}
}
}
src/VisualStudio/Core/Def/Implementation/ChangeSignature/ChangeSignatureLanguageService.cs
浏览文件 @
4277d623
using
Microsoft.VisualStudio.Text
;
using
System.Collections.Generic
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.IntellisenseControls
;
using
Microsoft.VisualStudio.Text
;
using
Microsoft.VisualStudio.Text.Projection
;
using
Microsoft.VisualStudio.Utilities
;
namespace
Microsoft.VisualStudio.LanguageServices.Implementation.ChangeSignature
{
internal
class
ChangeSignatureLanguageService
internal
abstract
class
ChangeSignatureLanguageService
:
I
ChangeSignatureLanguageService
{
public
abstract
Task
<
IntellisenseTextBoxViewModel
[
]>
CreateViewModelsAsync
(
string
[]
rolesCollectionType
,
string
[]
rolesCollectionName
,
int
insertPosition
,
Document
document
,
string
documentText
,
IContentType
contentType
,
IntellisenseTextBoxViewModelFactory
intellisenseTextBoxViewModelFactory
,
CancellationToken
cancellationToken
);
public
abstract
void
GeneratePreviewGrammar
(
ChangeSignatureDialogViewModel
.
AddedParameterViewModel
addedParameterViewModel
,
List
<
SymbolDisplayPart
>
displayParts
);
public
abstract
bool
IsTypeNameValid
(
string
typeName
);
protected
ITrackingSpan
[]
CreateTrackingSpansHelper
(
IProjectionSnapshot
snapshot
,
int
contextPoint
,
int
spaceBetweenTypeAndName
)
{
// Get the previous span/text.
...
...
src/VisualStudio/Core/Def/Implementation/ChangeSignature/IChangeSignatureLanguageService.cs
浏览文件 @
4277d623
...
...
@@ -4,6 +4,7 @@
using
System.Threading
;
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis
;
using
Microsoft.CodeAnalysis.CSharp.Syntax
;
using
Microsoft.CodeAnalysis.Host
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.IntellisenseControls
;
using
Microsoft.VisualStudio.Utilities
;
...
...
@@ -24,5 +25,7 @@ internal interface IChangeSignatureLanguageService : ILanguageService
CancellationToken
cancellationToken
);
void
GeneratePreviewGrammar
(
AddedParameterViewModel
addedParameterViewModel
,
List
<
SymbolDisplayPart
>
displayParts
);
bool
IsTypeNameValid
(
string
typeName
);
}
}
src/VisualStudio/Core/Def/Implementation/ChangeSignature/VisualStudioChangeSignatureOptionsService.cs
浏览文件 @
4277d623
...
...
@@ -115,7 +115,7 @@ public AddedParameterResult GetAddedParameter(Document document, int insertPosit
_intellisenseTextBoxViewModelFactory
,
cancellationToken
).
ConfigureAwait
(
false
);
return
new
AddParameterDialog
(
viewModels
[
0
],
viewModels
[
1
],
document
.
Project
.
Solution
.
Workspace
.
Services
.
GetService
<
INotificationService
>());
return
new
AddParameterDialog
(
viewModels
[
0
],
viewModels
[
1
],
document
.
Project
.
Solution
.
Workspace
.
Services
.
GetService
<
INotificationService
>()
,
document
);
}
}
}
src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs
浏览文件 @
4277d623
...
...
@@ -144,6 +144,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to A type and name must be provided..
/// </summary>
internal
static
string
A_type_and_name_must_be_provided
{
get
{
return
ResourceManager
.
GetString
(
"A_type_and_name_must_be_provided"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to _Access:.
/// </summary>
...
...
@@ -2307,6 +2316,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Parameter name contains invalid character(s)..
/// </summary>
internal
static
string
Parameter_name_contains_invalid_characters
{
get
{
return
ResourceManager
.
GetString
(
"Parameter_name_contains_invalid_characters"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Parameter preferences:.
/// </summary>
...
...
@@ -2316,6 +2334,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Parameter type contains invalid character(s)..
/// </summary>
internal
static
string
Parameter_type_contains_invalid_characters
{
get
{
return
ResourceManager
.
GetString
(
"Parameter_type_contains_invalid_characters"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Parameters:.
/// </summary>
...
...
src/VisualStudio/Core/Def/ServicesVSResources.resx
浏览文件 @
4277d623
...
...
@@ -1064,9 +1064,15 @@ I agree to all of the foregoing:</value>
<data
name=
"Avoid_unused_value_assignments"
xml:space=
"preserve"
>
<value>
Avoid unused value assignments
</value>
</data>
<data
name=
"Parameter_name_contains_invalid_characters"
xml:space=
"preserve"
>
<value>
Parameter name contains invalid character(s).
</value>
</data>
<data
name=
"Parameter_preferences_colon"
xml:space=
"preserve"
>
<value>
Parameter preferences:
</value>
</data>
<data
name=
"Parameter_type_contains_invalid_characters"
xml:space=
"preserve"
>
<value>
Parameter type contains invalid character(s).
</value>
</data>
<data
name=
"Non_public_methods"
xml:space=
"preserve"
>
<value>
Non-public methods
</value>
</data>
...
...
@@ -1178,6 +1184,9 @@ I agree to all of the foregoing:</value>
<data
name=
"A_new_namespace_will_be_created"
xml:space=
"preserve"
>
<value>
A new namespace will be created
</value>
</data>
<data
name=
"A_type_and_name_must_be_provided"
xml:space=
"preserve"
>
<value>
A type and name must be provided.
</value>
</data>
<data
name=
"Rename_0_to_1"
xml:space=
"preserve"
>
<value>
Rename {0} to {1}
</value>
</data>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf
浏览文件 @
4277d623
...
...
@@ -12,6 +12,11 @@
<target
state=
"translated"
>
Vytvoří se nový obor názvů.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"A_type_and_name_must_be_provided"
>
<source>
A type and name must be provided.
</source>
<target
state=
"new"
>
A type and name must be provided.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Add"
>
<source>
_Add
</source>
<target
state=
"new"
>
_Add
</target>
...
...
@@ -437,11 +442,21 @@
<target
state=
"new"
>
Parameter name:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_name_contains_invalid_characters"
>
<source>
Parameter name contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter name contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_preferences_colon"
>
<source>
Parameter preferences:
</source>
<target
state=
"translated"
>
Předvolby parametrů:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_type_contains_invalid_characters"
>
<source>
Parameter type contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter type contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parentheses_preferences_colon"
>
<source>
Parentheses preferences:
</source>
<target
state=
"translated"
>
Předvolby závorek:
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf
浏览文件 @
4277d623
...
...
@@ -12,6 +12,11 @@
<target
state=
"translated"
>
Ein neuer Namespace wird erstellt.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"A_type_and_name_must_be_provided"
>
<source>
A type and name must be provided.
</source>
<target
state=
"new"
>
A type and name must be provided.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Add"
>
<source>
_Add
</source>
<target
state=
"new"
>
_Add
</target>
...
...
@@ -437,11 +442,21 @@
<target
state=
"new"
>
Parameter name:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_name_contains_invalid_characters"
>
<source>
Parameter name contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter name contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_preferences_colon"
>
<source>
Parameter preferences:
</source>
<target
state=
"translated"
>
Parametereinstellungen:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_type_contains_invalid_characters"
>
<source>
Parameter type contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter type contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parentheses_preferences_colon"
>
<source>
Parentheses preferences:
</source>
<target
state=
"translated"
>
Voreinstellungen für Klammern:
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf
浏览文件 @
4277d623
...
...
@@ -12,6 +12,11 @@
<target
state=
"translated"
>
Se creará un espacio de nombres
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"A_type_and_name_must_be_provided"
>
<source>
A type and name must be provided.
</source>
<target
state=
"new"
>
A type and name must be provided.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Add"
>
<source>
_Add
</source>
<target
state=
"new"
>
_Add
</target>
...
...
@@ -437,11 +442,21 @@
<target
state=
"new"
>
Parameter name:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_name_contains_invalid_characters"
>
<source>
Parameter name contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter name contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_preferences_colon"
>
<source>
Parameter preferences:
</source>
<target
state=
"translated"
>
Preferencias de parámetros:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_type_contains_invalid_characters"
>
<source>
Parameter type contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter type contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parentheses_preferences_colon"
>
<source>
Parentheses preferences:
</source>
<target
state=
"translated"
>
Preferencias de paréntesis:
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf
浏览文件 @
4277d623
...
...
@@ -12,6 +12,11 @@
<target
state=
"translated"
>
Un espace de noms va être créé
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"A_type_and_name_must_be_provided"
>
<source>
A type and name must be provided.
</source>
<target
state=
"new"
>
A type and name must be provided.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Add"
>
<source>
_Add
</source>
<target
state=
"new"
>
_Add
</target>
...
...
@@ -437,11 +442,21 @@
<target
state=
"new"
>
Parameter name:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_name_contains_invalid_characters"
>
<source>
Parameter name contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter name contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_preferences_colon"
>
<source>
Parameter preferences:
</source>
<target
state=
"translated"
>
Préférences relatives aux paramètres :
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_type_contains_invalid_characters"
>
<source>
Parameter type contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter type contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parentheses_preferences_colon"
>
<source>
Parentheses preferences:
</source>
<target
state=
"translated"
>
Préférences relatives aux parenthèses :
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf
浏览文件 @
4277d623
...
...
@@ -12,6 +12,11 @@
<target
state=
"translated"
>
Verrà creato un nuovo spazio dei nomi
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"A_type_and_name_must_be_provided"
>
<source>
A type and name must be provided.
</source>
<target
state=
"new"
>
A type and name must be provided.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Add"
>
<source>
_Add
</source>
<target
state=
"new"
>
_Add
</target>
...
...
@@ -437,11 +442,21 @@
<target
state=
"new"
>
Parameter name:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_name_contains_invalid_characters"
>
<source>
Parameter name contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter name contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_preferences_colon"
>
<source>
Parameter preferences:
</source>
<target
state=
"translated"
>
Preferenze per parametri:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_type_contains_invalid_characters"
>
<source>
Parameter type contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter type contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parentheses_preferences_colon"
>
<source>
Parentheses preferences:
</source>
<target
state=
"translated"
>
Preferenze per parentesi:
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf
浏览文件 @
4277d623
...
...
@@ -12,6 +12,11 @@
<target
state=
"translated"
>
新しい名前空間が作成されます
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"A_type_and_name_must_be_provided"
>
<source>
A type and name must be provided.
</source>
<target
state=
"new"
>
A type and name must be provided.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Add"
>
<source>
_Add
</source>
<target
state=
"new"
>
_Add
</target>
...
...
@@ -437,11 +442,21 @@
<target
state=
"new"
>
Parameter name:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_name_contains_invalid_characters"
>
<source>
Parameter name contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter name contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_preferences_colon"
>
<source>
Parameter preferences:
</source>
<target
state=
"translated"
>
パラメーターの優先順位:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_type_contains_invalid_characters"
>
<source>
Parameter type contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter type contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parentheses_preferences_colon"
>
<source>
Parentheses preferences:
</source>
<target
state=
"translated"
>
かっこの優先順位:
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf
浏览文件 @
4277d623
...
...
@@ -12,6 +12,11 @@
<target
state=
"translated"
>
새 네임스페이스가 만들어집니다.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"A_type_and_name_must_be_provided"
>
<source>
A type and name must be provided.
</source>
<target
state=
"new"
>
A type and name must be provided.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Add"
>
<source>
_Add
</source>
<target
state=
"new"
>
_Add
</target>
...
...
@@ -437,11 +442,21 @@
<target
state=
"new"
>
Parameter name:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_name_contains_invalid_characters"
>
<source>
Parameter name contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter name contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_preferences_colon"
>
<source>
Parameter preferences:
</source>
<target
state=
"translated"
>
매개 변수 기본 설정:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_type_contains_invalid_characters"
>
<source>
Parameter type contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter type contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parentheses_preferences_colon"
>
<source>
Parentheses preferences:
</source>
<target
state=
"translated"
>
괄호 기본 설정:
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf
浏览文件 @
4277d623
...
...
@@ -12,6 +12,11 @@
<target
state=
"translated"
>
Zostanie utworzona nowa przestrzeń nazw
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"A_type_and_name_must_be_provided"
>
<source>
A type and name must be provided.
</source>
<target
state=
"new"
>
A type and name must be provided.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Add"
>
<source>
_Add
</source>
<target
state=
"new"
>
_Add
</target>
...
...
@@ -437,11 +442,21 @@
<target
state=
"new"
>
Parameter name:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_name_contains_invalid_characters"
>
<source>
Parameter name contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter name contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_preferences_colon"
>
<source>
Parameter preferences:
</source>
<target
state=
"translated"
>
Preferencje dotyczące parametrów:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_type_contains_invalid_characters"
>
<source>
Parameter type contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter type contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parentheses_preferences_colon"
>
<source>
Parentheses preferences:
</source>
<target
state=
"translated"
>
Preferencje dotyczące nawiasów:
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf
浏览文件 @
4277d623
...
...
@@ -12,6 +12,11 @@
<target
state=
"translated"
>
Um namespace será criado
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"A_type_and_name_must_be_provided"
>
<source>
A type and name must be provided.
</source>
<target
state=
"new"
>
A type and name must be provided.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Add"
>
<source>
_Add
</source>
<target
state=
"new"
>
_Add
</target>
...
...
@@ -437,11 +442,21 @@
<target
state=
"new"
>
Parameter name:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_name_contains_invalid_characters"
>
<source>
Parameter name contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter name contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_preferences_colon"
>
<source>
Parameter preferences:
</source>
<target
state=
"translated"
>
Preferências de parâmetro:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_type_contains_invalid_characters"
>
<source>
Parameter type contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter type contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parentheses_preferences_colon"
>
<source>
Parentheses preferences:
</source>
<target
state=
"translated"
>
Preferências de parênteses:
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf
浏览文件 @
4277d623
...
...
@@ -12,6 +12,11 @@
<target
state=
"translated"
>
Будет создано пространство имен
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"A_type_and_name_must_be_provided"
>
<source>
A type and name must be provided.
</source>
<target
state=
"new"
>
A type and name must be provided.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Add"
>
<source>
_Add
</source>
<target
state=
"new"
>
_Add
</target>
...
...
@@ -437,11 +442,21 @@
<target
state=
"new"
>
Parameter name:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_name_contains_invalid_characters"
>
<source>
Parameter name contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter name contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_preferences_colon"
>
<source>
Parameter preferences:
</source>
<target
state=
"translated"
>
Предпочтения для параметров:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_type_contains_invalid_characters"
>
<source>
Parameter type contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter type contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parentheses_preferences_colon"
>
<source>
Parentheses preferences:
</source>
<target
state=
"translated"
>
Параметры круглых скобок:
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf
浏览文件 @
4277d623
...
...
@@ -12,6 +12,11 @@
<target
state=
"translated"
>
Yeni bir ad alanı oluşturulacak
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"A_type_and_name_must_be_provided"
>
<source>
A type and name must be provided.
</source>
<target
state=
"new"
>
A type and name must be provided.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Add"
>
<source>
_Add
</source>
<target
state=
"new"
>
_Add
</target>
...
...
@@ -437,11 +442,21 @@
<target
state=
"new"
>
Parameter name:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_name_contains_invalid_characters"
>
<source>
Parameter name contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter name contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_preferences_colon"
>
<source>
Parameter preferences:
</source>
<target
state=
"translated"
>
Parametre tercihleri:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_type_contains_invalid_characters"
>
<source>
Parameter type contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter type contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parentheses_preferences_colon"
>
<source>
Parentheses preferences:
</source>
<target
state=
"translated"
>
Parantez tercihleri:
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf
浏览文件 @
4277d623
...
...
@@ -12,6 +12,11 @@
<target
state=
"translated"
>
将创建一个新的命名空间
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"A_type_and_name_must_be_provided"
>
<source>
A type and name must be provided.
</source>
<target
state=
"new"
>
A type and name must be provided.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Add"
>
<source>
_Add
</source>
<target
state=
"new"
>
_Add
</target>
...
...
@@ -437,11 +442,21 @@
<target
state=
"new"
>
Parameter name:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_name_contains_invalid_characters"
>
<source>
Parameter name contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter name contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_preferences_colon"
>
<source>
Parameter preferences:
</source>
<target
state=
"translated"
>
参数首选项:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_type_contains_invalid_characters"
>
<source>
Parameter type contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter type contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parentheses_preferences_colon"
>
<source>
Parentheses preferences:
</source>
<target
state=
"translated"
>
括号首选项:
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf
浏览文件 @
4277d623
...
...
@@ -12,6 +12,11 @@
<target
state=
"translated"
>
將會建立新的命名空間
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"A_type_and_name_must_be_provided"
>
<source>
A type and name must be provided.
</source>
<target
state=
"new"
>
A type and name must be provided.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Add"
>
<source>
_Add
</source>
<target
state=
"new"
>
_Add
</target>
...
...
@@ -437,11 +442,21 @@
<target
state=
"new"
>
Parameter name:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_name_contains_invalid_characters"
>
<source>
Parameter name contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter name contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_preferences_colon"
>
<source>
Parameter preferences:
</source>
<target
state=
"translated"
>
參數喜好設定:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parameter_type_contains_invalid_characters"
>
<source>
Parameter type contains invalid character(s).
</source>
<target
state=
"new"
>
Parameter type contains invalid character(s).
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Parentheses_preferences_colon"
>
<source>
Parentheses preferences:
</source>
<target
state=
"translated"
>
括號喜好設定:
</target>
...
...
src/VisualStudio/VisualBasic/Impl/ChangeSignature/VisualBasicChangeSignatureLanguageService.vb
浏览文件 @
4277d623
...
...
@@ -3,7 +3,9 @@
Imports
System.Composition
Imports
System.Threading
Imports
Microsoft.CodeAnalysis
Imports
Microsoft.CodeAnalysis.CSharp.Syntax
Imports
Microsoft.CodeAnalysis.Host.Mef
Imports
Microsoft.CodeAnalysis.VisualBasic
Imports
Microsoft.VisualStudio.LanguageServices.Implementation.ChangeSignature
Imports
Microsoft.VisualStudio.LanguageServices.Implementation.IntellisenseControls
Imports
Microsoft.VisualStudio.Text
...
...
@@ -14,13 +16,12 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.ChangeSignature
<
ExportLanguageService
(
GetType
(
IChangeSignatureLanguageService
),
LanguageNames
.
VisualBasic
),
[
Shared
]
>
Friend
Class
VisualBasicChangeSignatureLanguageService
Inherits
ChangeSignatureLanguageService
Implements
IChangeSignatureLanguageService
Public
Async
Function
CreateViewModelsAsync
(
rolesCollectionType
()
As
String
,
Public
Overrides
Async
Function
CreateViewModelsAsync
(
rolesCollectionType
()
As
String
,
rolesCollectionName
()
As
String
,
insertPosition
As
Integer
,
document
As
Document
,
documentText
As
String
,
contentType
As
IContentType
,
intellisenseTextBoxViewModelFactory
As
IntellisenseTextBoxViewModelFactory
,
cancellationToken
As
CancellationToken
)
As
Task
(
Of
IntellisenseTextBoxViewModel
())
Implements
IChangeSignatureLanguageService
.
CreateViewModelsAsync
cancellationToken
As
CancellationToken
)
As
Task
(
Of
IntellisenseTextBoxViewModel
())
Dim
rolesCollections
=
{
rolesCollectionName
,
rolesCollectionType
}
' We insert '[]' so that we're always able to generate the type even if the name field is empty.
...
...
@@ -38,9 +39,13 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.ChangeSignature
cancellationToken
).
ConfigureAwait
(
False
)
End
Function
Public
Sub
GeneratePreviewGrammar
(
addedParameterViewModel
As
ChangeSignatureDialogViewModel
.
AddedParameterViewModel
,
displayParts
As
List
(
Of
SymbolDisplayPart
))
Implements
IChangeSignatureLanguageService
.
GeneratePreviewGrammar
Public
Overrides
Sub
GeneratePreviewGrammar
(
addedParameterViewModel
As
ChangeSignatureDialogViewModel
.
AddedParameterViewModel
,
displayParts
As
List
(
Of
SymbolDisplayPart
))
displayParts
.
Add
(
New
SymbolDisplayPart
(
SymbolDisplayPartKind
.
ParameterName
,
Nothing
,
addedParameterViewModel
.
Parameter
))
displayParts
.
Add
(
New
SymbolDisplayPart
(
SymbolDisplayPartKind
.
Keyword
,
Nothing
,
" As "
+
addedParameterViewModel
.
Type
))
End
Sub
Public
Overrides
Function
IsTypeNameValid
(
typeName
As
String
)
As
Boolean
Return
Not
SyntaxFactory
.
ParseTypeName
(
typeName
).
ContainsDiagnostics
End
Function
End
Class
End
Namespace
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录