Step 1 – building a code map of the application
The first thing when you refactor an application is to get to know what you are about to refactor. This means having a high-level view of the application and its dependencies. This helps you visualize all the moving parts involved and better plan your refactoring activities by identifying where to start.
If you have Visual Studio Enterprise edition, you can use its great architecture capabilities (such as code maps and dependency graphs) to visualize your code and its dependencies. However, since we are using Visual Studio Code (or if you don’t have the Enterprise edition of Visual Studio), we can do something else…
Sure, we can run through the code and identify every moving part of it, but since this is a CLI application, let’s do something smarter. 😉
Using the Help menu to build the code map
The Help menu that comes out of the box with System.CommandLine
is certainly great for learning...