如何找到命名空间及其成员的所有用法? [英] How can I find all usages of a namespace and its members?

查看:28
本文介绍了如何找到命名空间及其成员的所有用法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为给定命名空间或其成员的任何用法搜索一个大型解决方案,例如 System.IO.

I am trying to search a large solution for any usages of a given namespace or its members, say, System.IO.

Resharper 的 Find Usages 允许我查找对 System.IO 的引用,但仅限于明确使用时.如果文件声明了 using System.IO; 然后使用任何命名空间的成员而没有全名,则只能找到 using 引用.我还需要在每个文件中找到命名空间的任何成员的任何用法.

Resharper's Find Usages allows me to find references to System.IO, but only when used explicitly. If a file declares using System.IO; then uses any of the namespace's members without the full name, only the using reference is found. I need to find any usage of any member of the namespace in each file as well.

是否可以在 Visual Studio、Resharper 或任何其他插件中完成此搜索?

Can this be accomplished in Visual Studio, Resharper, or any other plugin do this search for me?

推荐答案

将光标置于using System.IO行的关键字using上.然后你可以使用普通的Find Usages (Shift+F12).这仅适用于 ReSharper.

Place cursor on keyword using of line using System.IO. Then you can use the normal Find Usages (Shift+F12). This works with ReSharper only.

这篇关于如何找到命名空间及其成员的所有用法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆