Exemple #1
0
        public static void Analyze(IMainToolWindowManager mainToolWindowManager, Lazy <IAnalyzerManager> analyzerManager, ILanguage language, IMemberRef member)
        {
            var memberDef = ResolveReference(member);

            var type = memberDef as TypeDef;

            if (type != null)
            {
                mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID);
                analyzerManager.Value.Add(new TypeNode(type));
            }

            var field = memberDef as FieldDef;

            if (field != null)
            {
                mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID);
                analyzerManager.Value.Add(new FieldNode(field));
            }

            var method = memberDef as MethodDef;

            if (method != null)
            {
                mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID);
                analyzerManager.Value.Add(new MethodNode(method));
            }

            var propertyAnalyzer = PropertyNode.TryCreateAnalyzer(member, language);

            if (propertyAnalyzer != null)
            {
                mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID);
                analyzerManager.Value.Add(propertyAnalyzer);
            }

            var eventAnalyzer = EventNode.TryCreateAnalyzer(member, language);

            if (eventAnalyzer != null)
            {
                mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID);
                analyzerManager.Value.Add(eventAnalyzer);
            }
        }
Exemple #2
0
        public static void Analyze(IDsToolWindowService toolWindowService, Lazy <IAnalyzerService> analyzerService, IDecompiler decompiler, IMemberRef member)
        {
            var memberDef = ResolveReference(member);

            var type = memberDef as TypeDef;

            if (type != null)
            {
                toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID);
                analyzerService.Value.Add(new TypeNode(type));
            }

            var field = memberDef as FieldDef;

            if (field != null)
            {
                toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID);
                analyzerService.Value.Add(new FieldNode(field));
            }

            var method = memberDef as MethodDef;

            if (method != null)
            {
                toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID);
                analyzerService.Value.Add(new MethodNode(method));
            }

            var propertyAnalyzer = PropertyNode.TryCreateAnalyzer(member, decompiler);

            if (propertyAnalyzer != null)
            {
                toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID);
                analyzerService.Value.Add(propertyAnalyzer);
            }

            var eventAnalyzer = EventNode.TryCreateAnalyzer(member, decompiler);

            if (eventAnalyzer != null)
            {
                toolWindowService.Show(AnalyzerToolWindowContent.THE_GUID);
                analyzerService.Value.Add(eventAnalyzer);
            }
        }