Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
4c91e16f
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,发现更多精彩内容 >>
提交
4c91e16f
编写于
9月 19, 2016
作者:
C
CyrusNajmabadi
提交者:
GitHub
9月 19, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #13903 from CyrusNajmabadi/stylePage
Update loc-strings, and add a comment to recent style work.
上级
2b08b2d3
3aece8a5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
12 addition
and
9 deletion
+12
-9
src/Features/CSharp/Portable/InvokeDelegateWithConditionalAccess/InvokeDelegateWithConditionalAccessAnalyzer.cs
...onalAccess/InvokeDelegateWithConditionalAccessAnalyzer.cs
+1
-1
src/VisualStudio/CSharp/Impl/CSharpVSResources.Designer.cs
src/VisualStudio/CSharp/Impl/CSharpVSResources.Designer.cs
+3
-3
src/VisualStudio/CSharp/Impl/CSharpVSResources.resx
src/VisualStudio/CSharp/Impl/CSharpVSResources.resx
+2
-2
src/VisualStudio/CSharp/Impl/Options/Formatting/StyleViewModel.cs
...alStudio/CSharp/Impl/Options/Formatting/StyleViewModel.cs
+1
-1
src/Workspaces/CSharp/Portable/CodeStyle/CSharpCodeStyleOptions.cs
...paces/CSharp/Portable/CodeStyle/CSharpCodeStyleOptions.cs
+2
-2
src/Workspaces/Core/Portable/CodeFixes/FixAllOccurrences/DocumentBasedFixAllProvider.cs
...odeFixes/FixAllOccurrences/DocumentBasedFixAllProvider.cs
+3
-0
未找到文件。
src/Features/CSharp/Portable/InvokeDelegateWithConditionalAccess/InvokeDelegateWithConditionalAccessAnalyzer.cs
浏览文件 @
4c91e16f
...
...
@@ -48,7 +48,7 @@ public override void Initialize(AnalysisContext context)
private
void
SyntaxNodeAction
(
SyntaxNodeAnalysisContext
syntaxContext
)
{
var
options
=
syntaxContext
.
Options
.
GetOptionSet
();
var
styleOption
=
options
.
GetOption
(
CSharpCodeStyleOptions
.
PreferConditional
Function
Call
);
var
styleOption
=
options
.
GetOption
(
CSharpCodeStyleOptions
.
PreferConditional
Delegate
Call
);
if
(!
styleOption
.
Value
)
{
// Bail immediately if the user has disabled this feature.
...
...
src/VisualStudio/CSharp/Impl/CSharpVSResources.Designer.cs
浏览文件 @
4c91e16f
...
...
@@ -871,11 +871,11 @@ internal class CSharpVSResources {
}
/// <summary>
/// Looks up a localized string similar to Prefer conditional
function
call.
/// Looks up a localized string similar to Prefer conditional
delegate
call.
/// </summary>
internal
static
string
Prefer_conditional_
function
_call
{
internal
static
string
Prefer_conditional_
delegate
_call
{
get
{
return
ResourceManager
.
GetString
(
"Prefer_conditional_
function
_call"
,
resourceCulture
);
return
ResourceManager
.
GetString
(
"Prefer_conditional_
delegate
_call"
,
resourceCulture
);
}
}
...
...
src/VisualStudio/CSharp/Impl/CSharpVSResources.resx
浏览文件 @
4c91e16f
...
...
@@ -489,7 +489,7 @@
<data
name=
"Prefer_throw_expression"
xml:space=
"preserve"
>
<value>
Prefer throw-expression
</value>
</data>
<data
name=
"Prefer_conditional_
function
_call"
xml:space=
"preserve"
>
<value>
Prefer conditional
function
call
</value>
<data
name=
"Prefer_conditional_
delegate
_call"
xml:space=
"preserve"
>
<value>
Prefer conditional
delegate
call
</value>
</data>
</root>
\ No newline at end of file
src/VisualStudio/CSharp/Impl/Options/Formatting/StyleViewModel.cs
浏览文件 @
4c91e16f
...
...
@@ -317,7 +317,7 @@ internal StyleViewModel(OptionSet optionSet, IServiceProvider serviceProvider) :
CodeStyleItems
.
Add
(
new
SimpleCodeStyleOptionViewModel
(
CSharpCodeStyleOptions
.
UseImplicitTypeWhereApparent
,
CSharpVSResources
.
When_variable_type_is_apparent
,
s_varWhereApparentPreviewTrue
,
s_varWhereApparentPreviewFalse
,
this
,
optionSet
,
varGroupTitle
,
typeStylePreferences
));
CodeStyleItems
.
Add
(
new
SimpleCodeStyleOptionViewModel
(
CSharpCodeStyleOptions
.
UseImplicitTypeWherePossible
,
CSharpVSResources
.
Elsewhere
,
s_varWherePossiblePreviewTrue
,
s_varWherePossiblePreviewFalse
,
this
,
optionSet
,
varGroupTitle
,
typeStylePreferences
));
CodeStyleItems
.
Add
(
new
SimpleCodeStyleOptionViewModel
(
CSharpCodeStyleOptions
.
PreferConditional
FunctionCall
,
CSharpVSResources
.
Prefer_conditional_function
_call
,
s_preferConditionalFunctionCall
,
s_preferConditionalFunctionCall
,
this
,
optionSet
,
nullCheckingTitle
));
CodeStyleItems
.
Add
(
new
SimpleCodeStyleOptionViewModel
(
CSharpCodeStyleOptions
.
PreferConditional
DelegateCall
,
CSharpVSResources
.
Prefer_conditional_delegate
_call
,
s_preferConditionalFunctionCall
,
s_preferConditionalFunctionCall
,
this
,
optionSet
,
nullCheckingTitle
));
//CodeStyleItems.Add(new SimpleCodeStyleOptionViewModel(CodeStyleOptions.PreferThrowExpression, CSharpVSResources.Prefer_throw_expression, s_preferThrowExpression, s_preferThrowExpression, this, optionSet, nullCheckingTitle));
}
}
...
...
src/Workspaces/CSharp/Portable/CodeStyle/CSharpCodeStyleOptions.cs
浏览文件 @
4c91e16f
...
...
@@ -20,7 +20,7 @@ internal static class CSharpCodeStyleOptions
public
static
readonly
Option
<
CodeStyleOption
<
bool
>>
UseImplicitTypeWherePossible
=
new
Option
<
CodeStyleOption
<
bool
>>(
nameof
(
CSharpCodeStyleOptions
),
nameof
(
UseImplicitTypeWherePossible
),
defaultValue
:
CodeStyleOption
<
bool
>.
Default
,
storageLocations
:
new
RoamingProfileStorageLocation
(
"TextEditor.CSharp.Specific.UseImplicitTypeWherePossible"
));
public
static
readonly
Option
<
CodeStyleOption
<
bool
>>
PreferConditional
FunctionCall
=
new
Option
<
CodeStyleOption
<
bool
>>(
nameof
(
CSharpCodeStyleOptions
),
nameof
(
PreferConditionalFunction
Call
),
defaultValue
:
CodeStyleOptions
.
trueWithSuggestionEnforcement
,
storageLocations
:
new
RoamingProfileStorageLocation
(
"TextEditor.CSharp.Specific.PreferConditional
Function
Call"
));
public
static
readonly
Option
<
CodeStyleOption
<
bool
>>
PreferConditional
DelegateCall
=
new
Option
<
CodeStyleOption
<
bool
>>(
nameof
(
CSharpCodeStyleOptions
),
nameof
(
PreferConditionalDelegate
Call
),
defaultValue
:
CodeStyleOptions
.
trueWithSuggestionEnforcement
,
storageLocations
:
new
RoamingProfileStorageLocation
(
"TextEditor.CSharp.Specific.PreferConditional
Delegate
Call"
));
}
}
src/Workspaces/Core/Portable/CodeFixes/FixAllOccurrences/DocumentBasedFixAllProvider.cs
浏览文件 @
4c91e16f
...
...
@@ -36,6 +36,9 @@ public sealed override async Task<CodeAction> GetFixAsync(FixAllContext fixAllCo
var
currentSolution
=
fixAllState
.
Solution
;
foreach
(
var
task
in
updatedDocumentTasks
)
{
// 'await' the tasks so that if any completed in a cancelled manner then we'll
// throw the right exception here. Calling .Result on the tasks might end up
// with AggregateExceptions being thrown instead.
var
updatedDocument
=
await
task
.
ConfigureAwait
(
false
);
currentSolution
=
currentSolution
.
WithDocumentSyntaxRoot
(
updatedDocument
.
Id
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录