Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
97f550a1
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,发现更多精彩内容 >>
提交
97f550a1
编写于
10月 02, 2019
作者:
C
Cyrus Najmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add UI
上级
40638404
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
219 addition
and
2 deletion
+219
-2
src/VisualStudio/CSharp/Impl/Options/Formatting/StyleViewModel.cs
...alStudio/CSharp/Impl/Options/Formatting/StyleViewModel.cs
+33
-0
src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs
src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs
+18
-0
src/VisualStudio/Core/Def/ServicesVSResources.resx
src/VisualStudio/Core/Def/ServicesVSResources.resx
+6
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf
+10
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf
+10
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf
+10
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf
+10
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf
+10
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf
+10
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf
+10
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf
+10
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf
+10
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf
+10
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf
+10
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf
...VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf
+10
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf
...VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf
+10
-0
src/VisualStudio/VisualBasic/Impl/Options/StyleViewModel.vb
src/VisualStudio/VisualBasic/Impl/Options/StyleViewModel.vb
+29
-0
src/Workspaces/Core/Portable/CodeStyle/CodeStyleOptions.cs
src/Workspaces/Core/Portable/CodeStyle/CodeStyleOptions.cs
+3
-2
未找到文件。
src/VisualStudio/CSharp/Impl/Options/Formatting/StyleViewModel.cs
浏览文件 @
97f550a1
...
...
@@ -813,6 +813,38 @@ void Method()
}}
//]
}}
"
;
private
static
readonly
string
s_preferSystemHashCode
=
$@"
using System;
class Customer1
{{
int
a
,
b
,
c
;
//[
// {ServicesVSResources.Prefer_colon}
// {ServicesVSResources.Requires_System_HashCode_be_present_in_project}
public
override
int
GetHashCode
()
{{
return
System
.
HashCode
.
Combine
(
a
,
b
,
c
);
}}
//]
}}
class Customer2
{{
int
a
,
b
,
c
;
//[
// {ServicesVSResources.Over_colon}
public
override
int
GetHashCode
()
{{
var
hashCode
=
339610899
;
hashCode
=
hashCode
*
-
1521134295
+
a
.
GetHashCode
();
hashCode
=
hashCode
*
-
1521134295
+
b
.
GetHashCode
();
hashCode
=
hashCode
*
-
1521134295
+
c
.
GetHashCode
();
return
hashCode
;
}}
//]
}}
"
;
private
static
readonly
string
s_preferLocalFunctionOverAnonymousFunction
=
$@"
...
...
@@ -1617,6 +1649,7 @@ internal StyleViewModel(OptionStore optionStore, IServiceProvider serviceProvide
AddBracesOptions
(
optionStore
,
codeBlockPreferencesGroupTitle
);
CodeStyleItems
.
Add
(
new
BooleanCodeStyleOptionViewModel
(
CodeStyleOptions
.
PreferAutoProperties
,
ServicesVSResources
.
analyzer_Prefer_auto_properties
,
s_preferAutoProperties
,
s_preferAutoProperties
,
this
,
optionStore
,
codeBlockPreferencesGroupTitle
));
CodeStyleItems
.
Add
(
new
BooleanCodeStyleOptionViewModel
(
CSharpCodeStyleOptions
.
PreferSimpleUsingStatement
,
ServicesVSResources
.
Prefer_simple_using_statement
,
s_preferSimpleUsingStatement
,
s_preferSimpleUsingStatement
,
this
,
optionStore
,
codeBlockPreferencesGroupTitle
));
CodeStyleItems
.
Add
(
new
BooleanCodeStyleOptionViewModel
(
CodeStyleOptions
.
PreferSystemHashCode
,
ServicesVSResources
.
Prefer_System_HashCode_in_GetHashCode
,
s_preferSystemHashCode
,
s_preferSystemHashCode
,
this
,
optionStore
,
codeBlockPreferencesGroupTitle
));
AddParenthesesOptions
(
OptionStore
);
...
...
src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs
浏览文件 @
97f550a1
...
...
@@ -2423,6 +2423,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Prefer 'System.HashCode' in 'GetHashCode'.
/// </summary>
internal
static
string
Prefer_System_HashCode_in_GetHashCode
{
get
{
return
ResourceManager
.
GetString
(
"Prefer_System_HashCode_in_GetHashCode"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to prefer throwing properties.
/// </summary>
...
...
@@ -2717,6 +2726,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Requires 'System.HashCode' be present in project.
/// </summary>
internal
static
string
Requires_System_HashCode_be_present_in_project
{
get
{
return
ResourceManager
.
GetString
(
"Requires_System_HashCode_be_present_in_project"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Reset Visual Studio default keymapping.
/// </summary>
...
...
src/VisualStudio/Core/Def/ServicesVSResources.resx
浏览文件 @
97f550a1
...
...
@@ -1323,4 +1323,10 @@ I agree to all of the foregoing:</value>
<data
name=
"Updating_severity"
xml:space=
"preserve"
>
<value>
Updating severity
</value>
</data>
<data
name=
"Prefer_System_HashCode_in_GetHashCode"
xml:space=
"preserve"
>
<value>
Prefer 'System.HashCode' in 'GetHashCode'
</value>
</data>
<data
name=
"Requires_System_HashCode_be_present_in_project"
xml:space=
"preserve"
>
<value>
Requires 'System.HashCode' be present in project
</value>
</data>
</root>
\ No newline at end of file
src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf
浏览文件 @
97f550a1
...
...
@@ -352,6 +352,11 @@
<target
state=
"translated"
>
Pozastaveno (počet úloh ve frontě: {0})
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_System_HashCode_in_GetHashCode"
>
<source>
Prefer 'System.HashCode' in 'GetHashCode'
</source>
<target
state=
"new"
>
Prefer 'System.HashCode' in 'GetHashCode'
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_compound_assignments"
>
<source>
Prefer compound assignments
</source>
<target
state=
"translated"
>
Preferovat složená přiřazení
</target>
...
...
@@ -402,6 +407,11 @@
<target
state=
"translated"
>
Nahlásit neplatné regulární výrazy
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Requires_System_HashCode_be_present_in_project"
>
<source>
Requires 'System.HashCode' be present in project
</source>
<target
state=
"new"
>
Requires 'System.HashCode' be present in project
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Reset_Visual_Studio_default_keymapping"
>
<source>
Reset Visual Studio default keymapping
</source>
<target
state=
"translated"
>
Obnovit výchozí mapování klávesnice sady Visual Studio
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf
浏览文件 @
97f550a1
...
...
@@ -352,6 +352,11 @@
<target
state=
"translated"
>
Angehalten ({0} Tasks in der Warteschlange)
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_System_HashCode_in_GetHashCode"
>
<source>
Prefer 'System.HashCode' in 'GetHashCode'
</source>
<target
state=
"new"
>
Prefer 'System.HashCode' in 'GetHashCode'
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_compound_assignments"
>
<source>
Prefer compound assignments
</source>
<target
state=
"translated"
>
Zusammengesetzte Zuweisungen bevorzugen
</target>
...
...
@@ -402,6 +407,11 @@
<target
state=
"translated"
>
Ungültige reguläre Ausdrücke melden
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Requires_System_HashCode_be_present_in_project"
>
<source>
Requires 'System.HashCode' be present in project
</source>
<target
state=
"new"
>
Requires 'System.HashCode' be present in project
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Reset_Visual_Studio_default_keymapping"
>
<source>
Reset Visual Studio default keymapping
</source>
<target
state=
"translated"
>
Visual Studio-Standardtastenzuordnung zurücksetzen
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf
浏览文件 @
97f550a1
...
...
@@ -352,6 +352,11 @@
<target
state=
"translated"
>
En pausa ({0} tareas en cola)
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_System_HashCode_in_GetHashCode"
>
<source>
Prefer 'System.HashCode' in 'GetHashCode'
</source>
<target
state=
"new"
>
Prefer 'System.HashCode' in 'GetHashCode'
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_compound_assignments"
>
<source>
Prefer compound assignments
</source>
<target
state=
"translated"
>
Preferir asignaciones compuestas
</target>
...
...
@@ -402,6 +407,11 @@
<target
state=
"translated"
>
Notificar expresiones regulares no válidas
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Requires_System_HashCode_be_present_in_project"
>
<source>
Requires 'System.HashCode' be present in project
</source>
<target
state=
"new"
>
Requires 'System.HashCode' be present in project
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Reset_Visual_Studio_default_keymapping"
>
<source>
Reset Visual Studio default keymapping
</source>
<target
state=
"translated"
>
Restablecer asignaciones de teclado predeterminadas de Visual Studio
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf
浏览文件 @
97f550a1
...
...
@@ -352,6 +352,11 @@
<target
state=
"translated"
>
Suspendu ({0} tâches en file d'attente)
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_System_HashCode_in_GetHashCode"
>
<source>
Prefer 'System.HashCode' in 'GetHashCode'
</source>
<target
state=
"new"
>
Prefer 'System.HashCode' in 'GetHashCode'
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_compound_assignments"
>
<source>
Prefer compound assignments
</source>
<target
state=
"translated"
>
Préférer les affectations composées
</target>
...
...
@@ -402,6 +407,11 @@
<target
state=
"translated"
>
Signaler les expressions régulières non valides
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Requires_System_HashCode_be_present_in_project"
>
<source>
Requires 'System.HashCode' be present in project
</source>
<target
state=
"new"
>
Requires 'System.HashCode' be present in project
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Reset_Visual_Studio_default_keymapping"
>
<source>
Reset Visual Studio default keymapping
</source>
<target
state=
"translated"
>
Réinitialiser la configuration du clavier par défaut de Visual Studio
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf
浏览文件 @
97f550a1
...
...
@@ -352,6 +352,11 @@
<target
state=
"translated"
>
Sospeso ({0} attività in coda)
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_System_HashCode_in_GetHashCode"
>
<source>
Prefer 'System.HashCode' in 'GetHashCode'
</source>
<target
state=
"new"
>
Prefer 'System.HashCode' in 'GetHashCode'
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_compound_assignments"
>
<source>
Prefer compound assignments
</source>
<target
state=
"translated"
>
Preferisci assegnazioni composte
</target>
...
...
@@ -402,6 +407,11 @@
<target
state=
"translated"
>
Segnala espressioni regolari non valide
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Requires_System_HashCode_be_present_in_project"
>
<source>
Requires 'System.HashCode' be present in project
</source>
<target
state=
"new"
>
Requires 'System.HashCode' be present in project
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Reset_Visual_Studio_default_keymapping"
>
<source>
Reset Visual Studio default keymapping
</source>
<target
state=
"translated"
>
Reimposta il mapping dei tasti predefinito di Visual Studio
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf
浏览文件 @
97f550a1
...
...
@@ -352,6 +352,11 @@
<target
state=
"translated"
>
一時停止中 ({0} 個のタスクがキューにあります)
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_System_HashCode_in_GetHashCode"
>
<source>
Prefer 'System.HashCode' in 'GetHashCode'
</source>
<target
state=
"new"
>
Prefer 'System.HashCode' in 'GetHashCode'
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_compound_assignments"
>
<source>
Prefer compound assignments
</source>
<target
state=
"translated"
>
複合割り当てを優先
</target>
...
...
@@ -402,6 +407,11 @@
<target
state=
"translated"
>
無効な正規表現を報告
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Requires_System_HashCode_be_present_in_project"
>
<source>
Requires 'System.HashCode' be present in project
</source>
<target
state=
"new"
>
Requires 'System.HashCode' be present in project
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Reset_Visual_Studio_default_keymapping"
>
<source>
Reset Visual Studio default keymapping
</source>
<target
state=
"translated"
>
Visual Studio の既定のキーマップをリセットします
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf
浏览文件 @
97f550a1
...
...
@@ -352,6 +352,11 @@
<target
state=
"translated"
>
일시 중지됨(큐의 {0}개 작업)
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_System_HashCode_in_GetHashCode"
>
<source>
Prefer 'System.HashCode' in 'GetHashCode'
</source>
<target
state=
"new"
>
Prefer 'System.HashCode' in 'GetHashCode'
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_compound_assignments"
>
<source>
Prefer compound assignments
</source>
<target
state=
"translated"
>
복합 대입 선호
</target>
...
...
@@ -402,6 +407,11 @@
<target
state=
"translated"
>
잘못된 정규식 보고
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Requires_System_HashCode_be_present_in_project"
>
<source>
Requires 'System.HashCode' be present in project
</source>
<target
state=
"new"
>
Requires 'System.HashCode' be present in project
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Reset_Visual_Studio_default_keymapping"
>
<source>
Reset Visual Studio default keymapping
</source>
<target
state=
"translated"
>
Visual Studio 기본 키 매핑을 다시 설정
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf
浏览文件 @
97f550a1
...
...
@@ -352,6 +352,11 @@
<target
state=
"translated"
>
Wstrzymano (zadania w kolejce: {0})
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_System_HashCode_in_GetHashCode"
>
<source>
Prefer 'System.HashCode' in 'GetHashCode'
</source>
<target
state=
"new"
>
Prefer 'System.HashCode' in 'GetHashCode'
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_compound_assignments"
>
<source>
Prefer compound assignments
</source>
<target
state=
"translated"
>
Preferuj przypisania złożone
</target>
...
...
@@ -402,6 +407,11 @@
<target
state=
"translated"
>
Raportuj nieprawidłowe wyrażenia regularne
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Requires_System_HashCode_be_present_in_project"
>
<source>
Requires 'System.HashCode' be present in project
</source>
<target
state=
"new"
>
Requires 'System.HashCode' be present in project
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Reset_Visual_Studio_default_keymapping"
>
<source>
Reset Visual Studio default keymapping
</source>
<target
state=
"translated"
>
Zresetuj domyślne mapowanie klawiszy programu Visual Studio
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf
浏览文件 @
97f550a1
...
...
@@ -352,6 +352,11 @@
<target
state=
"translated"
>
Em pausa ({0} tarefas na fila)
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_System_HashCode_in_GetHashCode"
>
<source>
Prefer 'System.HashCode' in 'GetHashCode'
</source>
<target
state=
"new"
>
Prefer 'System.HashCode' in 'GetHashCode'
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_compound_assignments"
>
<source>
Prefer compound assignments
</source>
<target
state=
"translated"
>
Preferir atribuições de compostos
</target>
...
...
@@ -402,6 +407,11 @@
<target
state=
"translated"
>
Relatar expressões regulares inválidas
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Requires_System_HashCode_be_present_in_project"
>
<source>
Requires 'System.HashCode' be present in project
</source>
<target
state=
"new"
>
Requires 'System.HashCode' be present in project
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Reset_Visual_Studio_default_keymapping"
>
<source>
Reset Visual Studio default keymapping
</source>
<target
state=
"translated"
>
Redefinir mapeamento de teclas padrão do Visual Studio
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf
浏览文件 @
97f550a1
...
...
@@ -352,6 +352,11 @@
<target
state=
"translated"
>
Приостановлено (задач в очереди: {0})
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_System_HashCode_in_GetHashCode"
>
<source>
Prefer 'System.HashCode' in 'GetHashCode'
</source>
<target
state=
"new"
>
Prefer 'System.HashCode' in 'GetHashCode'
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_compound_assignments"
>
<source>
Prefer compound assignments
</source>
<target
state=
"translated"
>
Предпочитать составные присваивания
</target>
...
...
@@ -402,6 +407,11 @@
<target
state=
"translated"
>
Сообщать о недопустимых регулярных выражениях
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Requires_System_HashCode_be_present_in_project"
>
<source>
Requires 'System.HashCode' be present in project
</source>
<target
state=
"new"
>
Requires 'System.HashCode' be present in project
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Reset_Visual_Studio_default_keymapping"
>
<source>
Reset Visual Studio default keymapping
</source>
<target
state=
"translated"
>
Сброс схемы назначения клавиш Visual Studio по умолчанию
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf
浏览文件 @
97f550a1
...
...
@@ -352,6 +352,11 @@
<target
state=
"translated"
>
Duraklatıldı (kuyrukta {0} görev var)
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_System_HashCode_in_GetHashCode"
>
<source>
Prefer 'System.HashCode' in 'GetHashCode'
</source>
<target
state=
"new"
>
Prefer 'System.HashCode' in 'GetHashCode'
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_compound_assignments"
>
<source>
Prefer compound assignments
</source>
<target
state=
"translated"
>
Bileşik atamaları tercih et
</target>
...
...
@@ -402,6 +407,11 @@
<target
state=
"translated"
>
Geçersiz normal ifadeleri bildir
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Requires_System_HashCode_be_present_in_project"
>
<source>
Requires 'System.HashCode' be present in project
</source>
<target
state=
"new"
>
Requires 'System.HashCode' be present in project
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Reset_Visual_Studio_default_keymapping"
>
<source>
Reset Visual Studio default keymapping
</source>
<target
state=
"translated"
>
Visual Studio varsayılan tuş eşlemesine sıfırla
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf
浏览文件 @
97f550a1
...
...
@@ -352,6 +352,11 @@
<target
state=
"translated"
>
已暂停(队列中有 {0} 个任务)
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_System_HashCode_in_GetHashCode"
>
<source>
Prefer 'System.HashCode' in 'GetHashCode'
</source>
<target
state=
"new"
>
Prefer 'System.HashCode' in 'GetHashCode'
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_compound_assignments"
>
<source>
Prefer compound assignments
</source>
<target
state=
"translated"
>
首选复合赋值
</target>
...
...
@@ -402,6 +407,11 @@
<target
state=
"translated"
>
报告无效的正规表达式
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Requires_System_HashCode_be_present_in_project"
>
<source>
Requires 'System.HashCode' be present in project
</source>
<target
state=
"new"
>
Requires 'System.HashCode' be present in project
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Reset_Visual_Studio_default_keymapping"
>
<source>
Reset Visual Studio default keymapping
</source>
<target
state=
"translated"
>
重置 Visual Studio 默认项映射
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf
浏览文件 @
97f550a1
...
...
@@ -352,6 +352,11 @@
<target
state=
"translated"
>
已暫停 (佇列中的 {0} 工作)
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_System_HashCode_in_GetHashCode"
>
<source>
Prefer 'System.HashCode' in 'GetHashCode'
</source>
<target
state=
"new"
>
Prefer 'System.HashCode' in 'GetHashCode'
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Prefer_compound_assignments"
>
<source>
Prefer compound assignments
</source>
<target
state=
"translated"
>
優先使用複合指派
</target>
...
...
@@ -402,6 +407,11 @@
<target
state=
"translated"
>
回報無效的規則運算式
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Requires_System_HashCode_be_present_in_project"
>
<source>
Requires 'System.HashCode' be present in project
</source>
<target
state=
"new"
>
Requires 'System.HashCode' be present in project
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Reset_Visual_Studio_default_keymapping"
>
<source>
Reset Visual Studio default keymapping
</source>
<target
state=
"translated"
>
重設 Visual Studio 預設按鍵對應
</target>
...
...
src/VisualStudio/VisualBasic/Impl/Options/StyleViewModel.vb
浏览文件 @
97f550a1
...
...
@@ -349,6 +349,34 @@ Class Customer2
End Property
//]
End Class
"
Private
Shared
ReadOnly
s_preferSystemHashCode
As
String
=
$
"
Imports System
Class Customer1
Dim a, b, c As Integer
//[
' {ServicesVSResources.Prefer_colon}
// {ServicesVSResources.Requires_System_HashCode_be_present_in_project}
Public Overrides Function GetHashCodeAsInteger()
Return System.HashCode.Combine(a, b, c)
End Function
//]
End Class
Class Customer2
Dim a, b, c As Integer
//[
' {ServicesVSResources.Over_colon}
Public Overrides Function GetHashCodeAsInteger()
Dim hashCode = 339610899
hashCode = hashCode * -1521134295 + a.GetHashCode()
hashCode = hashCode * -1521134295 + b.GetHashCode()
hashCode = hashCode * -1521134295 + c.GetHashCode()
return hashCode
End Function
//]
End Class
"
Private
Shared
ReadOnly
s_preferIsNothingCheckOverReferenceEquals
As
String
=
$
"
...
...
@@ -657,6 +685,7 @@ End Class
' Code block
Me
.
CodeStyleItems
.
Add
(
New
BooleanCodeStyleOptionViewModel
(
CodeStyleOptions
.
PreferAutoProperties
,
ServicesVSResources
.
analyzer_Prefer_auto_properties
,
s_preferAutoProperties
,
s_preferAutoProperties
,
Me
,
optionStore
,
codeBlockPreferencesGroupTitle
))
Me
.
CodeStyleItems
.
Add
(
New
BooleanCodeStyleOptionViewModel
(
CodeStyleOptions
.
PreferSystemHashCode
,
ServicesVSResources
.
Prefer_System_HashCode_in_GetHashCode
,
s_preferSystemHashCode
,
s_preferSystemHashCode
,
Me
,
optionStore
,
codeBlockPreferencesGroupTitle
))
' expression preferences
Me
.
CodeStyleItems
.
Add
(
New
BooleanCodeStyleOptionViewModel
(
CodeStyleOptions
.
PreferObjectInitializer
,
ServicesVSResources
.
Prefer_object_initializer
,
s_preferObjectInitializer
,
s_preferObjectInitializer
,
Me
,
optionStore
,
expressionPreferencesGroupTitle
))
...
...
src/Workspaces/Core/Portable/CodeStyle/CodeStyleOptions.cs
浏览文件 @
97f550a1
...
...
@@ -358,11 +358,12 @@ private static string GetAccessibilityModifiersRequiredEditorConfigString(CodeSt
KeyValuePairUtil
.
Create
(
"all"
,
UnusedParametersPreference
.
AllMethods
),
});
internal
static
readonly
PerLanguageOption
<
CodeStyleOption
<
bool
>>
PreferSystemHashCode
=
new
PerLanguageOption
<
CodeStyleOption
<
bool
>>
(
nameof
(
CodeStyleOptions
)
,
internal
static
readonly
PerLanguageOption
<
CodeStyleOption
<
bool
>>
PreferSystemHashCode
=
CreateOption
(
CodeStyleOptionGroups
.
ExpressionLevelPreferences
,
nameof
(
PreferSystemHashCode
),
defaultValue
:
TrueWithSuggestionEnforcement
,
storageLocations
:
new
OptionStorageLocation
[]{
EditorConfigStorageLocation
.
ForBoolCodeStyleOption
(
"dotnet_prefer_system_hashcode"
),
new
RoamingProfileStorageLocation
(
"TextEditor.%LANGUAGE%.Specific.PreferSystemHashCode"
)
});
static
CodeStyleOptions
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录