Wiki

Clone wiki

VSExtensions / Move Type To New File (Roslyn)

Move Type To New File (Roslyn)


Summary

C# code refactor to move class/struct/interface/enum/delegate into a new .cs file.

Features

  • Supporting Class/Structure/Interface/Enum/Delegate.
  • Supporting Nested-Type, Directives(#region/#if...#else...#endif) .
  • Auto-adding "partial" keyword if necessary.
  • Auto-removing unused using in the new .cs file.
  • Previewing changes for all(multiple) document(s).
  • Auto-updating.

Screenshot

CodeAction

CodeAction.png

Preview

Preview.png

Download

https://marketplace.visualstudio.com/items?itemName=AustinLuo.MoveTypeToNewFileRoslyn

Upgrade Log

v2.0.0.19

  • Supporting Interface/Enum/Delegate.
  • Supporting Nested-Type, Directives(#region/#if...#else...#endif) .
  • Auto-removing unused usings from the new .cs file.

v1.0.2

First release.

  • Supporting Class/Structure.
  • Supporting 2 levels Nested-Type.
  • Auto-adding "partial" keyword if necessary.
  • Previewing changes for all(multiple) document(s).
  • Auto-updating.

Please feel free to let me know if you find any issues or have any suggestions, Have fun!

欢迎加入 QQ 讨论群:126749548

Updated