- Roslyn Cookbook
- Manish Vasani
- 111字
- 2021-07-15 17:07:30
Creating a symbol analyzer to report issues about symbol declarations
A symbol analyzer registers action callbacks to analyze one or more kinds of symbol declarations, such as types, methods, fields, properties, events, and so on, reports semantic issues about declarations.
In this section, we will create a symbol analyzer that extends the compiler diagnostic CS0542 (member names cannot be the same as their enclosing type) to report a diagnostic if member names are the same as any of the outer parent type. For example, the analyzer will report a diagnostic for the innermost type NestedClass here:
public class NestedClass
{
public class InnerClass
{
public class NestedClass
{
}
}
}
推薦閱讀
- Mastering OpenLayers 3
- INSTANT Mock Testing with PowerMock
- iOS面試一戰(zhàn)到底
- 嵌入式軟件系統(tǒng)測試:基于形式化方法的自動化測試解決方案
- What's New in TensorFlow 2.0
- Three.js開發(fā)指南:基于WebGL和HTML5在網(wǎng)頁上渲染3D圖形和動畫(原書第3版)
- SQL語言從入門到精通
- 深入RabbitMQ
- Jupyter數(shù)據(jù)科學實戰(zhàn)
- C++語言程序設(shè)計
- SQL Server 2008中文版項目教程(第3版)
- Visual Basic程序設(shè)計實驗指導(dǎo)及考試指南
- Python網(wǎng)絡(luò)爬蟲實例教程(視頻講解版)
- C語言程序設(shè)計
- Elasticsearch Blueprints