您希望有哪些复杂的重构功能?

发布于 2024-08-12 04:37:37 字数 125 浏览 2 评论 0原文

CodeRush 和 Resharper 等工具提供了许多简单的重构,例如“重命名变量”。但如果你可以拥有任何重构功能(无论多么复杂),它会是什么?

(我知道,每个人都希望进行“使程序完美”的重构,但让我们现实一点。)

Tools like CodeRush and Resharper offer lots of simple refactorings, such as 'Rename Variable'. But if you could have any refactoring feature at all (no matter how complex), what would it be?

(I know, everyone wants a 'make program perfect' refactoring, but let's be realistic here.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

烟酉 2024-08-19 04:37:37

我不会特别喜欢某个特定功能。我更喜欢对现有内置功能进行改进。即我想声明我的代码是如何重构的,即命名约定和变量定位。举个例子,我希望我的获取/设置属性如下:

public string Foo
{
   get
   {
      return foo;
   }
   set
   {
      _foo = value;
   }
}
private string _foo;

但是视觉工作室以某种我无法忍受的疯狂方式做到了这一点,这不符合我们的编码标准。

如果每个现有的重构方法都不感觉好像是由不同的人用自己的想法编写的,那就太好了。

I wouldn't particularly like a specific feature. I'd prefer improvements on the existing built in functions. I.e. I'd like to declare how my code is refactored, i.e. naming conventions and variable positioning. As an example, I'd like my get/set properties to be as follows:

public string Foo
{
   get
   {
      return foo;
   }
   set
   {
      _foo = value;
   }
}
private string _foo;

But visual studios does it in some crazy way I cant stand and that doesn't meet our coding standards.

It'd be good if every existing refactoring method didn't feel as though it'd been written by a different person with their own ideas.

喜爱纠缠 2024-08-19 04:37:37
  • 将此方法移至库 XYZ
  • Move this method to library XYZ
慕烟庭风 2024-08-19 04:37:37
  • 添加使(此类引用/方法调用)工作所需的引用和使用
  • Add the reference and using needed to make (this class reference/method call) work
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文