简体   繁体   English

无论如何要跟踪 C# 项目中使用或引用的所有类和接口?

[英]Is there anyway to trace all classes and interfaces used or referenced in a C# project?

I have a huge cryptography solution that has way more than what we need.我有一个巨大的密码学解决方案,它比我们需要的要多得多。 I need some way of debugging the program and keeping track of each class that was called after running my main() method.我需要某种方法来调试程序并跟踪运行 main() 方法后调用的每个类。 Any tips?有小费吗? Right now I'm attepting to hold down F11 and go through all the classes that opened up one by one and manually check what was called.现在我正在尝试按住 F11 并逐一浏览所有打开的类并手动检查调用的内容。 Not what I want to do.不是我想做的。 I'm stripping out everything that wasn't needed afterwards for memory leak, performance, and size reasons.由于内存泄漏、性能和大小原因,我正在删除之后不需要的所有内容。 It's open source code.它是开源代码。 Visual Studio 2008视觉工作室 2008

Dottrace should do the trick for you. Dottrace应该为您解决问题。 It has a really handy way of profiling any running .NET code and spitting out an easy-to-consume report .它有一种非常方便的方式来分析任何正在运行的 .NET 代码并生成易于使用的报告 I highly recommend the tool (it's also good for what it's designed for - performance & memory profiling).我强烈推荐该工具(它也适用于它的设计目的 - 性能和内存分析)。 This sounds like an ad, but I have nothing to do with the company.这听起来像是广告,但我与公司无关。 I just love the app.我只是喜欢这个应用程序。

You can use the .NET Reflector tool .您可以使用.NET 反射器工具 Also this is a built-in feature in Visual Studio 2010.这也是 Visual Studio 2010 中的内置功能。

Tracing has always been the default showcase for AOP .跟踪一直是AOP的默认展示。

PostSharp: http://www.sharpcrafters.com/aop.net PostSharp: http : //www.sharpcrafters.com/aop.net

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM