Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
4222a5c8
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,发现更多精彩内容 >>
提交
4222a5c8
编写于
11月 08, 2016
作者:
C
CyrusNajmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make more diagnostic analyzers into code style analyzers.
上级
765dbf3f
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
61 addition
and
48 deletion
+61
-48
src/Features/CSharp/Portable/AddBraces/CSharpAddBracesDiagnosticAnalyzer.cs
...p/Portable/AddBraces/CSharpAddBracesDiagnosticAnalyzer.cs
+18
-18
src/Features/Core/Portable/CodeStyle/AbstractCodeStyleDiagnosticAnalyzer.cs
...Portable/CodeStyle/AbstractCodeStyleDiagnosticAnalyzer.cs
+7
-2
src/Features/Core/Portable/Diagnostics/Analyzers/IDEDiagnosticIds.cs
...s/Core/Portable/Diagnostics/Analyzers/IDEDiagnosticIds.cs
+2
-0
src/Features/Core/Portable/PopulateSwitch/PopulateSwitchDiagnosticAnalyzer.cs
...rtable/PopulateSwitch/PopulateSwitchDiagnosticAnalyzer.cs
+10
-10
src/Features/Core/Portable/UseAutoProperty/AbstractUseAutoPropertyAnalyzer.cs
...rtable/UseAutoProperty/AbstractUseAutoPropertyAnalyzer.cs
+21
-16
src/Features/Core/Portable/UseAutoProperty/AbstractUseAutoPropertyCodeFixProvider.cs
...UseAutoProperty/AbstractUseAutoPropertyCodeFixProvider.cs
+3
-2
未找到文件。
src/Features/CSharp/Portable/AddBraces/CSharpAddBracesDiagnosticAnalyzer.cs
浏览文件 @
4222a5c8
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using
System.Collections.Immutable
;
using
Microsoft.CodeAnalysis.CodeStyle
;
using
Microsoft.CodeAnalysis.CSharp.Syntax
;
using
Microsoft.CodeAnalysis.Diagnostics
;
namespace
Microsoft.CodeAnalysis.CSharp.Diagnostics.AddBraces
{
[
DiagnosticAnalyzer
(
LanguageNames
.
CSharp
)]
internal
sealed
class
CSharpAddBracesDiagnosticAnalyzer
:
DiagnosticAnalyzer
,
IBuiltInAnalyzer
internal
sealed
class
CSharpAddBracesDiagnosticAnalyzer
:
AbstractCodeStyleDiagnosticAnalyzer
,
IBuiltInAnalyzer
{
private
static
readonly
LocalizableString
s_localizableTitle
=
new
LocalizableResourceString
(
nameof
(
FeaturesResources
.
Add_braces
),
FeaturesResources
.
ResourceManager
,
...
...
@@ -17,14 +19,11 @@ internal sealed class CSharpAddBracesDiagnosticAnalyzer : DiagnosticAnalyzer, IB
new
LocalizableResourceString
(
nameof
(
WorkspacesResources
.
Add_braces_to_0_statement
),
WorkspacesResources
.
ResourceManager
,
typeof
(
WorkspacesResources
));
private
static
readonly
DiagnosticDescriptor
s_descriptor
=
new
DiagnosticDescriptor
(
IDEDiagnosticIds
.
AddBracesDiagnosticId
,
s_localizableTitle
,
s_localizableMessage
,
DiagnosticCategory
.
Style
,
DiagnosticSeverity
.
Hidden
,
isEnabledByDefault
:
true
);
public
override
ImmutableArray
<
DiagnosticDescriptor
>
SupportedDiagnostics
{
get
;
}
=
ImmutableArray
.
Create
(
s_descriptor
);
public
CSharpAddBracesDiagnosticAnalyzer
()
:
base
(
IDEDiagnosticIds
.
AddBracesDiagnosticId
,
s_localizableTitle
,
s_localizableMessage
)
{
}
public
bool
OpenFileOnly
(
Workspace
workspace
)
=>
false
;
...
...
@@ -39,7 +38,8 @@ internal sealed class CSharpAddBracesDiagnosticAnalyzer : DiagnosticAnalyzer, IB
SyntaxKind
.
UsingStatement
,
SyntaxKind
.
LockStatement
);
public
override
void
Initialize
(
AnalysisContext
context
)
protected
override
void
InitializeWorker
(
AnalysisContext
context
)
=>
context
.
RegisterSyntaxNodeAction
(
AnalyzeNode
,
s_syntaxKindsOfInterest
);
public
DiagnosticAnalyzerCategory
GetAnalyzerCategory
()
=>
DiagnosticAnalyzerCategory
.
SemanticSpanAnalysis
;
...
...
@@ -53,7 +53,7 @@ public void AnalyzeNode(SyntaxNodeAnalysisContext context)
var
ifStatement
=
(
IfStatementSyntax
)
node
;
if
(
AnalyzeIfStatement
(
ifStatement
))
{
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
s_d
escriptor
,
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
HiddenD
escriptor
,
ifStatement
.
IfKeyword
.
GetLocation
(),
SyntaxFacts
.
GetText
(
SyntaxKind
.
IfKeyword
)));
}
}
...
...
@@ -63,7 +63,7 @@ public void AnalyzeNode(SyntaxNodeAnalysisContext context)
var
elseClause
=
(
ElseClauseSyntax
)
node
;
if
(
AnalyzeElseClause
(
elseClause
))
{
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
s_d
escriptor
,
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
HiddenD
escriptor
,
elseClause
.
ElseKeyword
.
GetLocation
(),
SyntaxFacts
.
GetText
(
SyntaxKind
.
ElseKeyword
)));
}
}
...
...
@@ -73,7 +73,7 @@ public void AnalyzeNode(SyntaxNodeAnalysisContext context)
var
forStatement
=
(
ForStatementSyntax
)
node
;
if
(
AnalyzeForStatement
(
forStatement
))
{
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
s_d
escriptor
,
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
HiddenD
escriptor
,
forStatement
.
ForKeyword
.
GetLocation
(),
SyntaxFacts
.
GetText
(
SyntaxKind
.
ForKeyword
)));
}
}
...
...
@@ -83,7 +83,7 @@ public void AnalyzeNode(SyntaxNodeAnalysisContext context)
var
forEachStatement
=
(
CommonForEachStatementSyntax
)
node
;
if
(
AnalyzeForEachStatement
(
forEachStatement
))
{
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
s_d
escriptor
,
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
HiddenD
escriptor
,
forEachStatement
.
ForEachKeyword
.
GetLocation
(),
SyntaxFacts
.
GetText
(
SyntaxKind
.
ForEachKeyword
)));
}
}
...
...
@@ -93,7 +93,7 @@ public void AnalyzeNode(SyntaxNodeAnalysisContext context)
var
whileStatement
=
(
WhileStatementSyntax
)
node
;
if
(
AnalyzeWhileStatement
(
whileStatement
))
{
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
s_d
escriptor
,
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
HiddenD
escriptor
,
whileStatement
.
WhileKeyword
.
GetLocation
(),
SyntaxFacts
.
GetText
(
SyntaxKind
.
WhileKeyword
)));
}
}
...
...
@@ -103,7 +103,7 @@ public void AnalyzeNode(SyntaxNodeAnalysisContext context)
var
doStatement
=
(
DoStatementSyntax
)
node
;
if
(
AnalyzeDoStatement
(
doStatement
))
{
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
s_d
escriptor
,
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
HiddenD
escriptor
,
doStatement
.
DoKeyword
.
GetLocation
(),
SyntaxFacts
.
GetText
(
SyntaxKind
.
DoKeyword
)));
}
}
...
...
@@ -113,7 +113,7 @@ public void AnalyzeNode(SyntaxNodeAnalysisContext context)
var
usingStatement
=
(
UsingStatementSyntax
)
context
.
Node
;
if
(
AnalyzeUsingStatement
(
usingStatement
))
{
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
s_d
escriptor
,
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
HiddenD
escriptor
,
usingStatement
.
UsingKeyword
.
GetLocation
(),
SyntaxFacts
.
GetText
(
SyntaxKind
.
UsingKeyword
)));
}
}
...
...
@@ -123,7 +123,7 @@ public void AnalyzeNode(SyntaxNodeAnalysisContext context)
var
lockStatement
=
(
LockStatementSyntax
)
context
.
Node
;
if
(
AnalyzeLockStatement
(
lockStatement
))
{
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
s_d
escriptor
,
context
.
ReportDiagnostic
(
Diagnostic
.
Create
(
HiddenD
escriptor
,
lockStatement
.
LockKeyword
.
GetLocation
(),
SyntaxFacts
.
GetText
(
SyntaxKind
.
LockKeyword
)));
}
}
...
...
src/Features/Core/Portable/CodeStyle/AbstractCodeStyleDiagnosticAnalyzer.cs
浏览文件 @
4222a5c8
...
...
@@ -9,6 +9,11 @@ internal abstract class AbstractCodeStyleDiagnosticAnalyzer : DiagnosticAnalyzer
{
protected
readonly
string
DescriptorId
;
/// <summary>
/// Diagnostic descriptor that for analysis results that we don't want any treatment for.
/// </summary>
protected
readonly
DiagnosticDescriptor
HiddenDescriptor
;
/// <summary>
/// Diagnostic descriptor for code you want to fade out *and* want to have a smart-tag
/// appear for. This is the common descriptor for code that is being faded out
...
...
@@ -39,7 +44,7 @@ internal abstract class AbstractCodeStyleDiagnosticAnalyzer : DiagnosticAnalyzer
_localizableTitle
=
title
;
_localizableMessage
=
message
??
title
;
var
primary
Descriptor
=
CreateDescriptorWithSeverity
(
DiagnosticSeverity
.
Hidden
);
Hidden
Descriptor
=
CreateDescriptorWithSeverity
(
DiagnosticSeverity
.
Hidden
);
UnnecessaryWithSuggestionDescriptor
=
CreateDescriptorWithId
(
descriptorId
,
_localizableTitle
,
_localizableMessage
,
...
...
@@ -51,7 +56,7 @@ internal abstract class AbstractCodeStyleDiagnosticAnalyzer : DiagnosticAnalyzer
DiagnosticSeverity
.
Hidden
,
DiagnosticCustomTags
.
Unnecessary
);
SupportedDiagnostics
=
ImmutableArray
.
Create
(
primary
Descriptor
,
UnnecessaryWithoutSuggestionDescriptor
,
UnnecessaryWithSuggestionDescriptor
);
Hidden
Descriptor
,
UnnecessaryWithoutSuggestionDescriptor
,
UnnecessaryWithSuggestionDescriptor
);
}
public
sealed
override
ImmutableArray
<
DiagnosticDescriptor
>
SupportedDiagnostics
{
get
;
}
...
...
src/Features/Core/Portable/Diagnostics/Analyzers/IDEDiagnosticIds.cs
浏览文件 @
4222a5c8
...
...
@@ -40,6 +40,8 @@ internal static class IDEDiagnosticIds
public
const
string
UseNullPropagationDiagnosticId
=
"IDE0030"
;
public
const
string
UseAutoPropertyDiagnosticId
=
"IDE0031"
;
// Analyzer error Ids
public
const
string
AnalyzerChangedId
=
"IDE1001"
;
public
const
string
AnalyzerDependencyConflictId
=
"IDE1002"
;
...
...
src/Features/Core/Portable/PopulateSwitch/PopulateSwitchDiagnosticAnalyzer.cs
浏览文件 @
4222a5c8
...
...
@@ -4,6 +4,7 @@
using
System.Collections.Immutable
;
using
System.Diagnostics
;
using
System.Reflection
;
using
Microsoft.CodeAnalysis.CodeStyle
;
using
Microsoft.CodeAnalysis.Diagnostics
;
using
Microsoft.CodeAnalysis.Semantics
;
using
Microsoft.CodeAnalysis.Shared.Extensions
;
...
...
@@ -11,26 +12,25 @@
namespace
Microsoft.CodeAnalysis.PopulateSwitch
{
[
DiagnosticAnalyzer
(
LanguageNames
.
CSharp
,
LanguageNames
.
VisualBasic
)]
internal
sealed
class
PopulateSwitchDiagnosticAnalyzer
:
DiagnosticAnalyzer
,
IBuiltInAnalyzer
internal
sealed
class
PopulateSwitchDiagnosticAnalyzer
:
AbstractCodeStyleDiagnosticAnalyzer
,
IBuiltInAnalyzer
{
private
static
readonly
LocalizableString
s_localizableTitle
=
new
LocalizableResourceString
(
nameof
(
FeaturesResources
.
Add_missing_cases
),
FeaturesResources
.
ResourceManager
,
typeof
(
FeaturesResources
));
private
static
readonly
LocalizableString
s_localizableMessage
=
new
LocalizableResourceString
(
nameof
(
WorkspacesResources
.
Populate_switch
),
WorkspacesResources
.
ResourceManager
,
typeof
(
WorkspacesResources
));
private
static
readonly
DiagnosticDescriptor
s_descriptor
=
new
DiagnosticDescriptor
(
IDEDiagnosticIds
.
PopulateSwitchDiagnosticId
,
s_localizableTitle
,
s_localizableMessage
,
DiagnosticCategory
.
Style
,
DiagnosticSeverity
.
Hidden
,
isEnabledByDefault
:
true
);
public
PopulateSwitchDiagnosticAnalyzer
()
:
base
(
IDEDiagnosticIds
.
PopulateSwitchDiagnosticId
,
s_localizableTitle
,
s_localizableMessage
)
{
}
#
region
Interface
methods
public
override
ImmutableArray
<
DiagnosticDescriptor
>
SupportedDiagnostics
=>
ImmutableArray
.
Create
(
s_descriptor
);
public
bool
OpenFileOnly
(
Workspace
workspace
)
=>
false
;
private
static
MethodInfo
s_registerMethod
=
typeof
(
AnalysisContext
).
GetTypeInfo
().
GetDeclaredMethod
(
"RegisterOperationActionImmutableArrayInternal"
);
p
ublic
override
void
Initialize
(
AnalysisContext
context
)
p
rotected
override
void
InitializeWorker
(
AnalysisContext
context
)
=>
s_registerMethod
.
Invoke
(
context
,
new
object
[]
{
new
Action
<
OperationAnalysisContext
>(
AnalyzeOperation
),
...
...
@@ -54,7 +54,7 @@ private void AnalyzeOperation(OperationAnalysisContext context)
.
Add
(
PopulateSwitchHelpers
.
MissingDefaultCase
,
missingDefaultCase
.
ToString
());
var
diagnostic
=
Diagnostic
.
Create
(
s_d
escriptor
,
switchBlock
.
GetLocation
(),
properties
:
properties
);
HiddenD
escriptor
,
switchBlock
.
GetLocation
(),
properties
:
properties
);
context
.
ReportDiagnostic
(
diagnostic
);
}
}
...
...
src/Features/Core/Portable/UseAutoProperty/AbstractUseAutoPropertyAnalyzer.cs
浏览文件 @
4222a5c8
...
...
@@ -4,29 +4,34 @@
using
System.Collections.Generic
;
using
System.Collections.Immutable
;
using
System.Threading
;
using
Microsoft.CodeAnalysis.CodeStyle
;
using
Microsoft.CodeAnalysis.Diagnostics
;
namespace
Microsoft.CodeAnalysis.UseAutoProperty
{
internal
abstract
class
AbstractUseAutoPropertyAnalyzer
<
TPropertyDeclaration
,
TFieldDeclaration
,
TVariableDeclarator
,
TExpression
>
:
DiagnosticAnalyzer
internal
abstract
class
AbstractUseAutoPropertyAnalyzer
<
TPropertyDeclaration
,
TFieldDeclaration
,
TVariableDeclarator
,
TExpression
>
:
AbstractCodeStyleDiagnosticAnalyzer
where
TPropertyDeclaration
:
SyntaxNode
where
TFieldDeclaration
:
SyntaxNode
where
TVariableDeclarator
:
SyntaxNode
where
TExpression
:
SyntaxNode
{
p
ublic
const
string
UseAutoProperty
=
nameof
(
UseAutoProperty
);
public
const
string
UseAutoPropertyFadedToken
=
nameof
(
UseAutoPropertyFadedToken
);
p
rivate
static
readonly
LocalizableString
s_title
=
new
LocalizableResourceString
(
nameof
(
FeaturesResources
.
Use_auto_property
),
FeaturesResources
.
ResourceManager
,
typeof
(
FeaturesResources
)
);
private
readonly
static
DiagnosticDescriptor
s_descriptor
=
new
DiagnosticDescriptor
(
UseAutoProperty
,
FeaturesResources
.
Use_auto_property
,
FeaturesResources
.
Use_auto_property
,
"Language"
,
DiagnosticSeverity
.
Hidden
,
isEnabledByDefault
:
true
);
protected
AbstractUseAutoPropertyAnalyzer
()
:
base
(
IDEDiagnosticIds
.
UseAutoPropertyDiagnosticId
,
s_title
,
s_title
)
{
}
private
readonly
static
DiagnosticDescriptor
s_fadedTokenDescriptor
=
new
DiagnosticDescriptor
(
UseAutoPropertyFadedToken
,
FeaturesResources
.
Use_auto_property
,
FeaturesResources
.
Use_auto_property
,
"Language"
,
DiagnosticSeverity
.
Hidden
,
isEnabledByDefault
:
true
,
customTags
:
new
[]
{
WellKnownDiagnosticTags
.
Unnecessary
});
//private readonly static DiagnosticDescriptor s_descriptor = new DiagnosticDescriptor(
// UseAutoProperty, FeaturesResources.Use_auto_property, FeaturesResources.Use_auto_property,
// "Language", DiagnosticSeverity.Hidden, isEnabledByDefault: true);
public
sealed
override
ImmutableArray
<
DiagnosticDescriptor
>
SupportedDiagnostics
=>
ImmutableArray
.
Create
(
s_descriptor
,
s_fadedTokenDescriptor
);
//private readonly static DiagnosticDescriptor s_fadedTokenDescriptor = new DiagnosticDescriptor(
// UseAutoPropertyFadedToken, FeaturesResources.Use_auto_property, FeaturesResources.Use_auto_property,
// "Language", DiagnosticSeverity.Hidden, isEnabledByDefault: true,
// customTags: new[] { WellKnownDiagnosticTags.Unnecessary });
protected
abstract
void
RegisterIneligibleFieldsAction
(
CompilationStartAnalysisContext
context
,
ConcurrentBag
<
IFieldSymbol
>
ineligibleFields
);
protected
abstract
bool
SupportsReadOnlyProperties
(
Compilation
compilation
);
...
...
@@ -36,7 +41,7 @@ internal abstract class AbstractUseAutoPropertyAnalyzer<TPropertyDeclaration, TF
protected
abstract
TExpression
GetSetterExpression
(
IMethodSymbol
setMethod
,
SemanticModel
semanticModel
,
CancellationToken
cancellationToken
);
protected
abstract
SyntaxNode
GetNodeToFade
(
TFieldDeclaration
fieldDeclaration
,
TVariableDeclarator
variableDeclarator
);
p
ublic
sealed
override
void
Initialize
(
AnalysisContext
context
)
p
rotected
sealed
override
void
InitializeWorker
(
AnalysisContext
context
)
=>
context
.
RegisterCompilationStartAction
(
csac
=>
{
var
analysisResults
=
new
ConcurrentBag
<
AnalysisResult
>();
...
...
@@ -251,7 +256,7 @@ private void Process(AnalysisResult result, CompilationAnalysisContext compilati
var
properties
=
ImmutableDictionary
<
string
,
string
>.
Empty
.
Add
(
nameof
(
result
.
SymbolEquivalenceKey
),
result
.
SymbolEquivalenceKey
);
// Fade out the field/variable we are going to remove.
var
diagnostic1
=
Diagnostic
.
Create
(
s_fadedToke
nDescriptor
,
nodeToFade
.
GetLocation
());
var
diagnostic1
=
Diagnostic
.
Create
(
UnnecessaryWithSuggestio
nDescriptor
,
nodeToFade
.
GetLocation
());
compilationContext
.
ReportDiagnostic
(
diagnostic1
);
// Now add diagnostics to both the field and the property saying we can convert it to
...
...
@@ -259,10 +264,10 @@ private void Process(AnalysisResult result, CompilationAnalysisContext compilati
// them when performing the code fix.
IEnumerable
<
Location
>
additionalLocations
=
new
Location
[]
{
propertyDeclaration
.
GetLocation
(),
variableDeclarator
.
GetLocation
()
};
var
diagnostic2
=
Diagnostic
.
Create
(
s_d
escriptor
,
propertyDeclaration
.
GetLocation
(),
additionalLocations
,
properties
);
var
diagnostic2
=
Diagnostic
.
Create
(
HiddenD
escriptor
,
propertyDeclaration
.
GetLocation
(),
additionalLocations
,
properties
);
compilationContext
.
ReportDiagnostic
(
diagnostic2
);
var
diagnostic3
=
Diagnostic
.
Create
(
s_d
escriptor
,
nodeToFade
.
GetLocation
(),
additionalLocations
,
properties
);
var
diagnostic3
=
Diagnostic
.
Create
(
HiddenD
escriptor
,
nodeToFade
.
GetLocation
(),
additionalLocations
,
properties
);
compilationContext
.
ReportDiagnostic
(
diagnostic3
);
}
...
...
@@ -297,4 +302,4 @@ internal class AnalysisResult
}
}
}
}
}
\ No newline at end of file
src/Features/Core/Portable/UseAutoProperty/AbstractUseAutoPropertyCodeFixProvider.cs
浏览文件 @
4222a5c8
...
...
@@ -9,6 +9,7 @@
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis.CodeActions
;
using
Microsoft.CodeAnalysis.CodeFixes
;
using
Microsoft.CodeAnalysis.Diagnostics
;
using
Microsoft.CodeAnalysis.Editing
;
using
Microsoft.CodeAnalysis.FindSymbols
;
using
Microsoft.CodeAnalysis.Formatting
;
...
...
@@ -28,8 +29,8 @@ internal abstract class AbstractUseAutoPropertyCodeFixProvider<TPropertyDeclarat
{
protected
static
SyntaxAnnotation
SpecializedFormattingAnnotation
=
new
SyntaxAnnotation
();
public
sealed
override
ImmutableArray
<
string
>
FixableDiagnosticIds
=>
ImmutableArray
.
Create
(
AbstractUseAutoPropertyAnalyzer
<
TPropertyDeclaration
,
TFieldDeclaration
,
TVariableDeclarator
,
TExpression
>.
UseAutoProperty
);
public
sealed
override
ImmutableArray
<
string
>
FixableDiagnosticIds
=>
ImmutableArray
.
Create
(
IDEDiagnosticIds
.
UseAutoPropertyDiagnosticId
);
public
sealed
override
FixAllProvider
GetFixAllProvider
()
=>
WellKnownFixAllProviders
.
BatchFixer
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录