- 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
{
}
}
}
推薦閱讀
- FuelPHP Application Development Blueprints
- Facebook Application Development with Graph API Cookbook
- SQL Server 2016從入門到精通(視頻教學(xué)超值版)
- Hands-On Image Processing with Python
- Java Web開發(fā)之道
- Python程序設(shè)計(jì)(第3版)
- 青少年美育趣味課堂:XMind思維導(dǎo)圖制作
- 微服務(wù)設(shè)計(jì)原理與架構(gòu)
- Learning Linux Binary Analysis
- Ray分布式機(jī)器學(xué)習(xí):利用Ray進(jìn)行大模型的數(shù)據(jù)處理、訓(xùn)練、推理和部署
- RISC-V體系結(jié)構(gòu)編程與實(shí)踐(第2版)
- 機(jī)器學(xué)習(xí)微積分一本通(Python版)
- Exploring SE for Android
- Getting Started with Electronic Projects
- Learning Redux