本文整理汇总了C#中DiagnosticAnalyzer.IsBuiltInAnalyzer方法的典型用法代码示例。如果您正苦于以下问题:C# DiagnosticAnalyzer.IsBuiltInAnalyzer方法的具体用法?C# DiagnosticAnalyzer.IsBuiltInAnalyzer怎么用?C# DiagnosticAnalyzer.IsBuiltInAnalyzer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DiagnosticAnalyzer
的用法示例。
在下文中一共展示了DiagnosticAnalyzer.IsBuiltInAnalyzer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsCandidateForFullSolutionAnalysis
private bool IsCandidateForFullSolutionAnalysis(DiagnosticAnalyzer analyzer, Project project)
{
// PERF: Don't query descriptors for compiler analyzer, always execute it.
if (HostAnalyzerManager.IsCompilerDiagnosticAnalyzer(project.Language, analyzer))
{
return true;
}
if (analyzer.IsBuiltInAnalyzer())
{
// always return true for builtin analyzer. we can't use
// descriptor check since many builtin analyzer always return
// hidden descriptor regardless what descriptor it actually
// return on runtime. they do this so that they can control
// severity through option page rather than rule set editor.
// this is special behavior only ide analyzer can do. we hope
// once we support editorconfig fully, third party can use this
// ability as well and we can remove this kind special treatment on builtin
// analyzer.
return true;
}
return Owner.HasNonHiddenDescriptor(analyzer, project);
}