Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
2b129de3
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,发现更多精彩内容 >>
提交
2b129de3
编写于
12月 07, 2018
作者:
S
Sam Harwell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve help text for Prefer Braces style
上级
1191414d
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
151 addition
and
4 deletion
+151
-4
src/VisualStudio/CSharp/Impl/Options/Formatting/StyleViewModel.cs
...alStudio/CSharp/Impl/Options/Formatting/StyleViewModel.cs
+73
-3
src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs
src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs
+10
-1
src/VisualStudio/Core/Def/ServicesVSResources.resx
src/VisualStudio/Core/Def/ServicesVSResources.resx
+3
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf
+5
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf
+5
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf
+5
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf
+5
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf
+5
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf
+5
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf
+5
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf
+5
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf
+5
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf
+5
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf
+5
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf
...VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf
+5
-0
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf
...VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf
+5
-0
未找到文件。
src/VisualStudio/CSharp/Impl/Options/Formatting/StyleViewModel.cs
浏览文件 @
2b129de3
...
...
@@ -628,6 +628,76 @@ void M2(string value)
//]
}}
}}
"
;
private
static
readonly
string
s_doNotPreferBraces
=
$@"
using System;
class Customer
{{
private
int
Age
;
void
M1
()
{{
//[
// {ServicesVSResources.Allow_colon}
if
(
test
)
Console
.
WriteLine
(
""
Text
""
);
// {ServicesVSResources.Allow_colon}
if
(
test
)
Console
.
WriteLine
(
""
Text
""
);
// {ServicesVSResources.Allow_colon}
if
(
test
)
Console
.
WriteLine
(
""
Text
""
);
// {ServicesVSResources.Allow_colon}
if
(
test
)
{{
Console
.
WriteLine
(
""
Text
""
);
}}
//]
}}
}}
"
;
private
static
readonly
string
s_preferBracesWhenMultiline
=
$@"
using System;
class Customer
{{
private
int
Age
;
void
M1
()
{{
//[
// {ServicesVSResources.Allow_colon}
if
(
test
)
Console
.
WriteLine
(
""
Text
""
);
// {ServicesVSResources.Allow_colon}
if
(
test
)
Console
.
WriteLine
(
""
Text
""
);
// {ServicesVSResources.Prefer_colon}
if
(
test
)
{{
Console
.
WriteLine
(
""
Text
""
);
}}
//]
}}
void
M2
()
{{
//[
// {ServicesVSResources.Over_colon}
if
(
test
)
Console
.
WriteLine
(
""
Text
""
);
//]
}}
}}
"
;
private
static
readonly
string
s_preferBraces
=
$@"
...
...
@@ -643,7 +713,7 @@ void M1()
// {ServicesVSResources.Prefer_colon}
if
(
test
)
{{
this
.
Display
(
);
Console
.
WriteLine
(
""
Text
""
);
}}
//]
}}
...
...
@@ -652,7 +722,7 @@ void M2()
//[
// {ServicesVSResources.Over_colon}
if
(
test
)
this
.
Display
(
);
Console
.
WriteLine
(
""
Text
""
);
//]
}}
}}
...
...
@@ -1467,7 +1537,7 @@ private void AddBracesOptions(OptionSet optionSet, string bracesPreferenceGroupT
CSharpCodeStyleOptions
.
PreferBraces
,
ServicesVSResources
.
Prefer_braces
,
enumValues
,
new
[]
{
s_preferBraces
,
s_
preferBraces
,
s_preferBraces
},
new
[]
{
s_preferBraces
,
s_
doNotPreferBraces
,
s_preferBracesWhenMultiline
},
this
,
optionSet
,
bracesPreferenceGroupTitle
,
bracesPreferences
));
}
...
...
src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs
浏览文件 @
2b129de3
...
...
@@ -19,7 +19,7 @@ namespace Microsoft.VisualStudio.LanguageServices {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"System.Resources.Tools.StronglyTypedResourceBuilder"
,
"1
5
.0.0.0"
)]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"System.Resources.Tools.StronglyTypedResourceBuilder"
,
"1
6
.0.0.0"
)]
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
()]
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
internal
class
ServicesVSResources
{
...
...
@@ -206,6 +206,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Allow:.
/// </summary>
internal
static
string
Allow_colon
{
get
{
return
ResourceManager
.
GetString
(
"Allow_colon"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Always for clarity.
/// </summary>
...
...
src/VisualStudio/Core/Def/ServicesVSResources.resx
浏览文件 @
2b129de3
...
...
@@ -1114,4 +1114,7 @@ I agree to all of the foregoing:</value>
<data
name=
"Value_returned_by_invocation_is_implicitly_ignored"
xml:space=
"preserve"
>
<value>
Value returned by invocation is implicitly ignored
</value>
</data>
<data
name=
"Allow_colon"
xml:space=
"preserve"
>
<value>
Allow:
</value>
</data>
</root>
\ No newline at end of file
src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf
浏览文件 @
2b129de3
...
...
@@ -7,6 +7,11 @@
<target
state=
"new"
>
All methods
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Allow_colon"
>
<source>
Allow:
</source>
<target
state=
"new"
>
Allow:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Always_for_clarity"
>
<source>
Always for clarity
</source>
<target
state=
"translated"
>
Vždy kvůli srozumitelnosti
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf
浏览文件 @
2b129de3
...
...
@@ -7,6 +7,11 @@
<target
state=
"new"
>
All methods
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Allow_colon"
>
<source>
Allow:
</source>
<target
state=
"new"
>
Allow:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Always_for_clarity"
>
<source>
Always for clarity
</source>
<target
state=
"translated"
>
Immer zur besseren Unterscheidung
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf
浏览文件 @
2b129de3
...
...
@@ -7,6 +7,11 @@
<target
state=
"new"
>
All methods
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Allow_colon"
>
<source>
Allow:
</source>
<target
state=
"new"
>
Allow:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Always_for_clarity"
>
<source>
Always for clarity
</source>
<target
state=
"translated"
>
Siempre por claridad
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf
浏览文件 @
2b129de3
...
...
@@ -7,6 +7,11 @@
<target
state=
"new"
>
All methods
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Allow_colon"
>
<source>
Allow:
</source>
<target
state=
"new"
>
Allow:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Always_for_clarity"
>
<source>
Always for clarity
</source>
<target
state=
"translated"
>
Toujours pour plus de clarté
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf
浏览文件 @
2b129de3
...
...
@@ -7,6 +7,11 @@
<target
state=
"new"
>
All methods
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Allow_colon"
>
<source>
Allow:
</source>
<target
state=
"new"
>
Allow:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Always_for_clarity"
>
<source>
Always for clarity
</source>
<target
state=
"translated"
>
Sempre per chiarezza
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf
浏览文件 @
2b129de3
...
...
@@ -7,6 +7,11 @@
<target
state=
"new"
>
All methods
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Allow_colon"
>
<source>
Allow:
</source>
<target
state=
"new"
>
Allow:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Always_for_clarity"
>
<source>
Always for clarity
</source>
<target
state=
"translated"
>
わかりやすくするために常に
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf
浏览文件 @
2b129de3
...
...
@@ -7,6 +7,11 @@
<target
state=
"new"
>
All methods
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Allow_colon"
>
<source>
Allow:
</source>
<target
state=
"new"
>
Allow:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Always_for_clarity"
>
<source>
Always for clarity
</source>
<target
state=
"translated"
>
명확하게 하기 위해 항상
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf
浏览文件 @
2b129de3
...
...
@@ -7,6 +7,11 @@
<target
state=
"new"
>
All methods
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Allow_colon"
>
<source>
Allow:
</source>
<target
state=
"new"
>
Allow:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Always_for_clarity"
>
<source>
Always for clarity
</source>
<target
state=
"translated"
>
Zawsze w celu zachowania jednoznaczności
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf
浏览文件 @
2b129de3
...
...
@@ -7,6 +7,11 @@
<target
state=
"new"
>
All methods
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Allow_colon"
>
<source>
Allow:
</source>
<target
state=
"new"
>
Allow:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Always_for_clarity"
>
<source>
Always for clarity
</source>
<target
state=
"translated"
>
Sempre para esclarecimento
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf
浏览文件 @
2b129de3
...
...
@@ -7,6 +7,11 @@
<target
state=
"new"
>
All methods
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Allow_colon"
>
<source>
Allow:
</source>
<target
state=
"new"
>
Allow:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Always_for_clarity"
>
<source>
Always for clarity
</source>
<target
state=
"translated"
>
Всегда использовать для ясности
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf
浏览文件 @
2b129de3
...
...
@@ -7,6 +7,11 @@
<target
state=
"new"
>
All methods
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Allow_colon"
>
<source>
Allow:
</source>
<target
state=
"new"
>
Allow:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Always_for_clarity"
>
<source>
Always for clarity
</source>
<target
state=
"translated"
>
Açıklık sağlamak için her zaman
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf
浏览文件 @
2b129de3
...
...
@@ -7,6 +7,11 @@
<target
state=
"new"
>
All methods
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Allow_colon"
>
<source>
Allow:
</source>
<target
state=
"new"
>
Allow:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Always_for_clarity"
>
<source>
Always for clarity
</source>
<target
state=
"translated"
>
为始终保持清楚起见
</target>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf
浏览文件 @
2b129de3
...
...
@@ -7,6 +7,11 @@
<target
state=
"new"
>
All methods
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Allow_colon"
>
<source>
Allow:
</source>
<target
state=
"new"
>
Allow:
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Always_for_clarity"
>
<source>
Always for clarity
</source>
<target
state=
"translated"
>
一律使用以明確表示
</target>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录