Inspecting the generated code
MVUX makes extensive use of code generation. It's used to generate ViewModels for models, entities, and commands. Inspecting the generated code can give you a lot of insight into how the ViewModels work under the hood as well as how MVUX operates behind the scenes.
Using Visual Studio, viewing the generated code can be achieved in several ways:
Placing the cursor on the class name and hitting F12:
Hitting Ctrl+T and typing in the ViewModel type name:
Navigating to the project's analyzers:
This method can also be used to inspect all code generated by MVUX and even other code generators.
- Expand the project's Dependencies object.
- Expand the current target platform (e.g. net8.0windows10.0...).
- Expand the Analyzers sub menu and then Uno.Extensions.Reactive.Generator.
- Under Uno.Extensions.Reactive.Generator.FeedsGenerator you'll find the generated ViewModel types.