adornment

Accessing all the methods and classes for VS Extension with Adornment

强颜欢笑 提交于 2019-12-13 06:56:33
问题 I am developing an extension for visual studio with adornment. I have to put label above every class and methods in active document. Now my problem is how can I get all the methods and classes? I searched for it but none of them shows the exact solution. Thanks in advance! 回答1: if(this._dte!=null && this._dte.ActiveDocument!=null) { List<CodeClass> foundClasses = new List<CodeClass>(); List<CodeFunction> foundMethod = new List<CodeFunction>(); CodeElements elementsInDocument = this._dte