Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET
Roslyn
提交
4c390351
R
Roslyn
项目概览
dotNET
/
Roslyn
通知
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,发现更多精彩内容 >>
提交
4c390351
编写于
9月 25, 2016
作者:
D
David Poeschl
提交者:
GitHub
9月 25, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #13841 from dpoeschl/ReanalyzeWhenCodeStylesChange
Reanalyze on CodeStyleOptions changed
上级
ba582bdf
0295b3cc
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
5 deletion
+7
-5
src/Features/Core/Portable/Diagnostics/DiagnosticAnalyzerService_IncrementalAnalyzer.cs
...gnostics/DiagnosticAnalyzerService_IncrementalAnalyzer.cs
+2
-0
src/Workspaces/CSharp/Portable/CodeStyle/CSharpCodeStyleOptions.cs
...paces/CSharp/Portable/CodeStyle/CSharpCodeStyleOptions.cs
+5
-5
未找到文件。
src/Features/Core/Portable/Diagnostics/DiagnosticAnalyzerService_IncrementalAnalyzer.cs
浏览文件 @
4c390351
...
...
@@ -5,6 +5,7 @@
using
System.Runtime.CompilerServices
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis.CodeStyle
;
using
Microsoft.CodeAnalysis.Internal.Log
;
using
Microsoft.CodeAnalysis.Options
;
using
Microsoft.CodeAnalysis.Shared.Options
;
...
...
@@ -128,6 +129,7 @@ public override void RemoveProject(ProjectId projectId)
public
override
bool
NeedsReanalysisOnOptionChanged
(
object
sender
,
OptionChangedEventArgs
e
)
{
return
e
.
Option
.
Feature
==
nameof
(
SimplificationOptions
)
||
e
.
Option
.
Feature
==
nameof
(
CodeStyleOptions
)
||
e
.
Option
==
ServiceFeatureOnOffOptions
.
ClosedFileDiagnostic
||
e
.
Option
==
RuntimeOptions
.
FullSolutionAnalysis
||
e
.
Option
==
InternalDiagnosticsOptions
.
UseDiagnosticEngineV2
||
...
...
src/Workspaces/CSharp/Portable/CodeStyle/CSharpCodeStyleOptions.cs
浏览文件 @
4c390351
...
...
@@ -8,19 +8,19 @@ namespace Microsoft.CodeAnalysis.CSharp.CodeStyle
internal
static
class
CSharpCodeStyleOptions
{
// TODO: get sign off on public api changes.
public
static
readonly
Option
<
bool
>
UseVarWhenDeclaringLocals
=
new
Option
<
bool
>(
nameof
(
C
SharpC
odeStyleOptions
),
nameof
(
UseVarWhenDeclaringLocals
),
defaultValue
:
true
,
public
static
readonly
Option
<
bool
>
UseVarWhenDeclaringLocals
=
new
Option
<
bool
>(
nameof
(
CodeStyleOptions
),
nameof
(
UseVarWhenDeclaringLocals
),
defaultValue
:
true
,
storageLocations
:
new
RoamingProfileStorageLocation
(
"TextEditor.CSharp.Specific.UseVarWhenDeclaringLocals"
));
public
static
readonly
Option
<
CodeStyleOption
<
bool
>>
UseImplicitTypeForIntrinsicTypes
=
new
Option
<
CodeStyleOption
<
bool
>>(
nameof
(
C
SharpC
odeStyleOptions
),
nameof
(
UseImplicitTypeForIntrinsicTypes
),
defaultValue
:
CodeStyleOption
<
bool
>.
Default
,
public
static
readonly
Option
<
CodeStyleOption
<
bool
>>
UseImplicitTypeForIntrinsicTypes
=
new
Option
<
CodeStyleOption
<
bool
>>(
nameof
(
CodeStyleOptions
),
nameof
(
UseImplicitTypeForIntrinsicTypes
),
defaultValue
:
CodeStyleOption
<
bool
>.
Default
,
storageLocations
:
new
RoamingProfileStorageLocation
(
"TextEditor.CSharp.Specific.UseImplicitTypeForIntrinsicTypes"
));
public
static
readonly
Option
<
CodeStyleOption
<
bool
>>
UseImplicitTypeWhereApparent
=
new
Option
<
CodeStyleOption
<
bool
>>(
nameof
(
C
SharpC
odeStyleOptions
),
nameof
(
UseImplicitTypeWhereApparent
),
defaultValue
:
CodeStyleOption
<
bool
>.
Default
,
public
static
readonly
Option
<
CodeStyleOption
<
bool
>>
UseImplicitTypeWhereApparent
=
new
Option
<
CodeStyleOption
<
bool
>>(
nameof
(
CodeStyleOptions
),
nameof
(
UseImplicitTypeWhereApparent
),
defaultValue
:
CodeStyleOption
<
bool
>.
Default
,
storageLocations
:
new
RoamingProfileStorageLocation
(
"TextEditor.CSharp.Specific.UseImplicitTypeWhereApparent"
));
public
static
readonly
Option
<
CodeStyleOption
<
bool
>>
UseImplicitTypeWherePossible
=
new
Option
<
CodeStyleOption
<
bool
>>(
nameof
(
C
SharpC
odeStyleOptions
),
nameof
(
UseImplicitTypeWherePossible
),
defaultValue
:
CodeStyleOption
<
bool
>.
Default
,
public
static
readonly
Option
<
CodeStyleOption
<
bool
>>
UseImplicitTypeWherePossible
=
new
Option
<
CodeStyleOption
<
bool
>>(
nameof
(
CodeStyleOptions
),
nameof
(
UseImplicitTypeWherePossible
),
defaultValue
:
CodeStyleOption
<
bool
>.
Default
,
storageLocations
:
new
RoamingProfileStorageLocation
(
"TextEditor.CSharp.Specific.UseImplicitTypeWherePossible"
));
public
static
readonly
Option
<
CodeStyleOption
<
bool
>>
PreferConditionalDelegateCall
=
new
Option
<
CodeStyleOption
<
bool
>>(
nameof
(
C
SharpC
odeStyleOptions
),
nameof
(
PreferConditionalDelegateCall
),
defaultValue
:
CodeStyleOptions
.
trueWithSuggestionEnforcement
,
public
static
readonly
Option
<
CodeStyleOption
<
bool
>>
PreferConditionalDelegateCall
=
new
Option
<
CodeStyleOption
<
bool
>>(
nameof
(
CodeStyleOptions
),
nameof
(
PreferConditionalDelegateCall
),
defaultValue
:
CodeStyleOptions
.
trueWithSuggestionEnforcement
,
storageLocations
:
new
RoamingProfileStorageLocation
(
"TextEditor.CSharp.Specific.PreferConditionalDelegateCall"
));
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录