Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
e9e030f1
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,发现更多精彩内容 >>
提交
e9e030f1
编写于
10月 29, 2019
作者:
G
Gen Lu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix LOC
上级
612f5c3c
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
123 addition
and
20 deletion
+123
-20
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/ExtensionMethodImportCompletionProviderTests.cs
...Providers/ExtensionMethodImportCompletionProviderTests.cs
+42
-0
src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/ImportCompletionItem.cs
...roviders/ImportCompletionProvider/ImportCompletionItem.cs
+4
-7
src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/SerializableImportCompletionItem.cs
...ortCompletionProvider/SerializableImportCompletionItem.cs
+0
-1
src/Workspaces/Core/Portable/Shared/Extensions/ProjectExtensions.cs
...aces/Core/Portable/Shared/Extensions/ProjectExtensions.cs
+1
-1
src/Workspaces/Core/Portable/WorkspacesResources.Designer.cs
src/Workspaces/Core/Portable/WorkspacesResources.Designer.cs
+9
-9
src/Workspaces/Core/Portable/WorkspacesResources.resx
src/Workspaces/Core/Portable/WorkspacesResources.resx
+2
-2
src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf
src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf
+5
-0
src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf
src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf
+5
-0
src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf
src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf
+5
-0
src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf
src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf
+5
-0
src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf
src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf
+5
-0
src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf
src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf
+5
-0
src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf
src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf
+5
-0
src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf
src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf
+5
-0
src/Workspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf
...orkspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf
+5
-0
src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf
src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf
+5
-0
src/Workspaces/Core/Portable/xlf/WorkspacesResources.tr.xlf
src/Workspaces/Core/Portable/xlf/WorkspacesResources.tr.xlf
+5
-0
src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf
...kspaces/Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf
+5
-0
src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf
...kspaces/Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf
+5
-0
未找到文件。
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/ExtensionMethodImportCompletionProviderTests.cs
浏览文件 @
e9e030f1
...
...
@@ -1145,6 +1145,48 @@ public void M({type} x)
inlineDescription
:
expectedNamespace
);
}
[
InlineData
(
"int"
)]
[
InlineData
(
"Exception"
)]
[
Theory
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
public
async
Task
TestIdenticalMethodName
(
string
type
)
{
var
file1
=
@"
using System;
namespace Foo
{
public static class ExtensionClass
{
public static bool ExtMethod(this int x)
=> true;
public static bool ExtMethod(this Exception x)
=> true;
}
}
"
;
var
file2
=
$@"
using System;
namespace Baz
{{
public
class
Bat
{{
public
void
M
({
type
}
x
)
{{
x
.
$$
}}
}}
}}
"
;
var
markup
=
GetMarkup
(
file2
,
file1
,
ReferenceType
.
None
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"ExtMethod"
,
glyph
:
(
int
)
Glyph
.
ExtensionMethodPublic
,
inlineDescription
:
"Foo"
);
}
private
Task
VerifyTypeImportItemExistsAsync
(
string
markup
,
string
expectedItem
,
int
glyph
,
string
inlineDescription
,
string
displayTextSuffix
=
null
,
string
expectedDescriptionOrNull
=
null
)
{
return
VerifyItemExistsAsync
(
markup
,
expectedItem
,
displayTextSuffix
:
displayTextSuffix
,
glyph
:
glyph
,
inlineDescription
:
inlineDescription
,
expectedDescriptionOrNull
:
expectedDescriptionOrNull
);
...
...
src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/ImportCompletionItem.cs
浏览文件 @
e9e030f1
...
...
@@ -21,9 +21,7 @@ internal static class ImportCompletionItem
private
const
string
SymbolKeyData
=
nameof
(
SymbolKeyData
);
public
static
CompletionItem
Create
(
INamedTypeSymbol
typeSymbol
,
string
containingNamespace
,
string
genericTypeSuffix
)
{
return
Create
(
typeSymbol
.
Name
,
typeSymbol
.
Arity
,
containingNamespace
,
typeSymbol
.
GetGlyph
(),
genericTypeSuffix
,
CompletionItemFlags
.
CachedAndExpanded
,
symbolKeyData
:
null
);
}
=>
Create
(
typeSymbol
.
Name
,
typeSymbol
.
Arity
,
containingNamespace
,
typeSymbol
.
GetGlyph
(),
genericTypeSuffix
,
CompletionItemFlags
.
CachedAndExpanded
,
symbolKeyData
:
null
);
public
static
CompletionItem
Create
(
string
name
,
int
arity
,
string
containingNamespace
,
Glyph
glyph
,
string
genericTypeSuffix
,
CompletionItemFlags
flags
,
string
?
symbolKeyData
)
{
...
...
@@ -39,7 +37,8 @@ public static CompletionItem Create(string name, int arity, string containingNam
}
else
{
// We don't need arity to recover symbol if we have SymbolKeyData.
// We don't need arity to recover symbol if we already have SymbolKeyData or it's 0.
// (but it still needed below to decide whether to show generic suffix)
builder
.
Add
(
TypeAritySuffixName
,
AbstractDeclaredSymbolInfoFactoryService
.
GetMetadataAritySuffix
(
arity
));
}
...
...
@@ -89,9 +88,7 @@ public static CompletionItem CreateAttributeItemWithoutSuffix(CompletionItem att
}
public
static
CompletionItem
CreateItemWithGenericDisplaySuffix
(
CompletionItem
item
,
string
genericTypeSuffix
)
{
return
item
.
WithDisplayTextSuffix
(
genericTypeSuffix
);
}
=>
item
.
WithDisplayTextSuffix
(
genericTypeSuffix
);
public
static
string
GetContainingNamespace
(
CompletionItem
item
)
=>
item
.
InlineDescription
;
...
...
src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/SerializableImportCompletionItem.cs
浏览文件 @
e9e030f1
...
...
@@ -2,7 +2,6 @@
#
nullable
enable
namespace
Microsoft.CodeAnalysis.Completion.Providers
{
internal
sealed
class
SerializableImportCompletionItem
...
...
src/Workspaces/Core/Portable/Shared/Extensions/ProjectExtensions.cs
浏览文件 @
e9e030f1
...
...
@@ -128,7 +128,7 @@ public static async Task<Compilation> GetRequiredCompilationAsync(this Project p
var
compilation
=
await
project
.
GetCompilationAsync
(
cancellationToken
).
ConfigureAwait
(
false
);
if
(
compilation
==
null
)
{
throw
new
InvalidOperationException
(
string
.
Format
(
WorkspacesResources
.
Project_0_does_not_support_compilation
,
project
.
Name
));
throw
new
InvalidOperationException
(
string
.
Format
(
WorkspacesResources
.
Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0
,
project
.
Name
));
}
return
compilation
;
...
...
src/Workspaces/Core/Portable/WorkspacesResources.Designer.cs
浏览文件 @
e9e030f1
...
...
@@ -574,6 +574,15 @@ internal class WorkspacesResources {
}
}
/// <summary>
/// Looks up a localized string similar to Compilation is required to accomplish the task but is not supported by project {0}..
/// </summary>
internal
static
string
Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0
{
get
{
return
ResourceManager
.
GetString
(
"Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Core EditorConfig Options.
/// </summary>
...
...
@@ -1366,15 +1375,6 @@ internal class WorkspacesResources {
}
}
/// <summary>
/// Looks up a localized string similar to Project {0} does not support compilation..
/// </summary>
internal
static
string
Project_0_does_not_support_compilation
{
get
{
return
ResourceManager
.
GetString
(
"Project_0_does_not_support_compilation"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Project file not found: '{0}'.
/// </summary>
...
...
src/Workspaces/Core/Portable/WorkspacesResources.resx
浏览文件 @
e9e030f1
...
...
@@ -1479,7 +1479,7 @@ Zero-width positive lookbehind assertions are typically used at the beginning of
<data
name=
"Document_does_not_support_syntax_trees"
xml:space=
"preserve"
>
<value>
Document does not support syntax trees
</value>
</data>
<data
name=
"
Project_0_does_not_support_compilation
"
xml:space=
"preserve"
>
<value>
Project {0} does not support compilation
.
</value>
<data
name=
"
Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0
"
xml:space=
"preserve"
>
<value>
Compilation is required to accomplish the task but is not supported by project {0}
.
</value>
</data>
</root>
\ No newline at end of file
src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf
浏览文件 @
e9e030f1
...
...
@@ -27,6 +27,11 @@
<target
state=
"translated"
>
Změna dokumentu {0} není podporovaná.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0"
>
<source>
Compilation is required to accomplish the task but is not supported by project {0}.
</source>
<target
state=
"new"
>
Compilation is required to accomplish the task but is not supported by project {0}.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Core_EditorConfig_Options"
>
<source>
Core EditorConfig Options
</source>
<target
state=
"translated"
>
Základní možnosti pro EditorConfig
</target>
...
...
src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf
浏览文件 @
e9e030f1
...
...
@@ -27,6 +27,11 @@
<target
state=
"translated"
>
Das Ändern des Dokuments "{0}" wird nicht unterstützt.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0"
>
<source>
Compilation is required to accomplish the task but is not supported by project {0}.
</source>
<target
state=
"new"
>
Compilation is required to accomplish the task but is not supported by project {0}.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Core_EditorConfig_Options"
>
<source>
Core EditorConfig Options
</source>
<target
state=
"translated"
>
Wichtige EditorConfig-Optionen
</target>
...
...
src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf
浏览文件 @
e9e030f1
...
...
@@ -27,6 +27,11 @@
<target
state=
"translated"
>
Documento cambiante '{0}' no es compatible.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0"
>
<source>
Compilation is required to accomplish the task but is not supported by project {0}.
</source>
<target
state=
"new"
>
Compilation is required to accomplish the task but is not supported by project {0}.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Core_EditorConfig_Options"
>
<source>
Core EditorConfig Options
</source>
<target
state=
"translated"
>
Opciones principales de EditorConfig
</target>
...
...
src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf
浏览文件 @
e9e030f1
...
...
@@ -27,6 +27,11 @@
<target
state=
"translated"
>
Le changement du document '{0}' n'est pas pris en charge.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0"
>
<source>
Compilation is required to accomplish the task but is not supported by project {0}.
</source>
<target
state=
"new"
>
Compilation is required to accomplish the task but is not supported by project {0}.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Core_EditorConfig_Options"
>
<source>
Core EditorConfig Options
</source>
<target
state=
"translated"
>
Options EditorConfig principales
</target>
...
...
src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf
浏览文件 @
e9e030f1
...
...
@@ -27,6 +27,11 @@
<target
state=
"translated"
>
La modifica del documento '{0}' non è supportata.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0"
>
<source>
Compilation is required to accomplish the task but is not supported by project {0}.
</source>
<target
state=
"new"
>
Compilation is required to accomplish the task but is not supported by project {0}.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Core_EditorConfig_Options"
>
<source>
Core EditorConfig Options
</source>
<target
state=
"translated"
>
Opzioni EditorConfig di base
</target>
...
...
src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf
浏览文件 @
e9e030f1
...
...
@@ -27,6 +27,11 @@
<target
state=
"translated"
>
ドキュメント '{0}' の変更はサポートされていません。
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0"
>
<source>
Compilation is required to accomplish the task but is not supported by project {0}.
</source>
<target
state=
"new"
>
Compilation is required to accomplish the task but is not supported by project {0}.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Core_EditorConfig_Options"
>
<source>
Core EditorConfig Options
</source>
<target
state=
"translated"
>
コア EditorConfig オプション
</target>
...
...
src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf
浏览文件 @
e9e030f1
...
...
@@ -27,6 +27,11 @@
<target
state=
"translated"
>
'{0}' 문서 변경은 지원되지 않습니다.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0"
>
<source>
Compilation is required to accomplish the task but is not supported by project {0}.
</source>
<target
state=
"new"
>
Compilation is required to accomplish the task but is not supported by project {0}.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Core_EditorConfig_Options"
>
<source>
Core EditorConfig Options
</source>
<target
state=
"translated"
>
코어 EditorConfig 옵션
</target>
...
...
src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf
浏览文件 @
e9e030f1
...
...
@@ -27,6 +27,11 @@
<target
state=
"translated"
>
Zmiana dokumentu „{0}” nie jest obsługiwana.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0"
>
<source>
Compilation is required to accomplish the task but is not supported by project {0}.
</source>
<target
state=
"new"
>
Compilation is required to accomplish the task but is not supported by project {0}.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Core_EditorConfig_Options"
>
<source>
Core EditorConfig Options
</source>
<target
state=
"translated"
>
Podstawowe opcje EditorConfig
</target>
...
...
src/Workspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf
浏览文件 @
e9e030f1
...
...
@@ -27,6 +27,11 @@
<target
state=
"translated"
>
Não há suporte para alterar o documento '{0}'.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0"
>
<source>
Compilation is required to accomplish the task but is not supported by project {0}.
</source>
<target
state=
"new"
>
Compilation is required to accomplish the task but is not supported by project {0}.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Core_EditorConfig_Options"
>
<source>
Core EditorConfig Options
</source>
<target
state=
"translated"
>
Opções Principais do EditorConfig
</target>
...
...
src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf
浏览文件 @
e9e030f1
...
...
@@ -27,6 +27,11 @@
<target
state=
"translated"
>
Изменение документа "{0}" не поддерживается.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0"
>
<source>
Compilation is required to accomplish the task but is not supported by project {0}.
</source>
<target
state=
"new"
>
Compilation is required to accomplish the task but is not supported by project {0}.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Core_EditorConfig_Options"
>
<source>
Core EditorConfig Options
</source>
<target
state=
"translated"
>
Основные параметры EditorConfig
</target>
...
...
src/Workspaces/Core/Portable/xlf/WorkspacesResources.tr.xlf
浏览文件 @
e9e030f1
...
...
@@ -27,6 +27,11 @@
<target
state=
"translated"
>
Değişen belge '{0}' desteklenmiyor.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0"
>
<source>
Compilation is required to accomplish the task but is not supported by project {0}.
</source>
<target
state=
"new"
>
Compilation is required to accomplish the task but is not supported by project {0}.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Core_EditorConfig_Options"
>
<source>
Core EditorConfig Options
</source>
<target
state=
"translated"
>
Çekirdek EditorConfig seçenekleri
</target>
...
...
src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf
浏览文件 @
e9e030f1
...
...
@@ -27,6 +27,11 @@
<target
state=
"translated"
>
不支持更改文档“{0}”。
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0"
>
<source>
Compilation is required to accomplish the task but is not supported by project {0}.
</source>
<target
state=
"new"
>
Compilation is required to accomplish the task but is not supported by project {0}.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Core_EditorConfig_Options"
>
<source>
Core EditorConfig Options
</source>
<target
state=
"translated"
>
Core EditorConfig 选项
</target>
...
...
src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf
浏览文件 @
e9e030f1
...
...
@@ -27,6 +27,11 @@
<target
state=
"translated"
>
不支援變更文件 '{0}'。
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0"
>
<source>
Compilation is required to accomplish the task but is not supported by project {0}.
</source>
<target
state=
"new"
>
Compilation is required to accomplish the task but is not supported by project {0}.
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Core_EditorConfig_Options"
>
<source>
Core EditorConfig Options
</source>
<target
state=
"translated"
>
核心 EditorConfig 選項
</target>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录