是否有一个Visual Studio 2010的扩展名进行排序的方法呢? [英] Is there a Visual Studio 2010 extension to sort methods?

查看:142
本文介绍了是否有一个Visual Studio 2010的扩展名进行排序的方法呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

了StyleCop 强制要求为C#文件的内容特定的排列顺序。例如,田应方法之前声明,并公开声明要来之前,私人的。

StyleCop mandates a particular sort order for the contents of C# files. For example, fields should be declared before methods and public declarations should come before private ones.

这是将有一个Visual Studio扩展到这些东西进入的顺序很有用自动。

It would be useful to have a Visual Studio extension to move these things into that order automatically.

难道一个的的扩展存在这个(我发现的 CodeSorter ,但反馈表明这是非常错误)?还是有,使其痛苦少手动重新排列这些内容的任何扩展或快捷方式?

Does a good extension exist for this (I've found CodeSorter, but the feedback suggests it's very buggy)? Or are there any extensions or shortcuts that make it less painful to reorder this content manually?

推荐答案

您可以用的 Regionerate

Regionerate是一个自动化工具,它可以帮助你在一段时间保持你的
码的布局。 Regionerate让您在
代码中定义的区域,并确定方式成员(字段,方法,属性等)
应放置在他们里面。 Regionerate是零摩擦的工具 -
设置的时候,你可以选择一个代码布局或者只使用默认代码布局(您希望您的
码看的方式)。从这一刻起
,Regionerate将确保您的代码如下的代码布局。

Regionerate is an automated tool which helps you to preserve your code's layout over time. Regionerate lets you define regions in your code and determine the way members (fields, methods, properties etc.) should be placed inside them. Regionerate is a zero-friction tool - when setting up, you can choose a Code Layout (the way you want your code to look) or just use the default Code Layout. From that moment on, Regionerate will make sure your code follows that Code Layout.

这篇关于是否有一个Visual Studio 2010的扩展名进行排序的方法呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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