Refactorings — simplify code, improve readability, make code more flexible (for future changes), or bring the code to meet certain standard without code behavior change. For example, Inline Method.
Code Providers — can change code behavior or declare undeclared types and members. Use them to supplement your code with blocks which you might want to type manually. For example, Create Event Trigger.
You can see a preview of the changes CodeRush can apply to your code.
Press Enter to perform the action.
The red target picker appears in Declaration Providers. This picker allows you to choose the place where the generated code can be inserted.
You can configure which Declaration Provider should invoke the target picker in the Editor | All Languages | Code Actions | Target Pickeroptions page.
Use the Up Arrow and Down Arrow keys to move the target picker.
Press Enter to generate code in the selected position.
For example, the Declare Field with Initializer code provider adds the initialized field declaration to the current class and assigns the parameter value to it.
The code providers for Blazor are unable to update references in closed .razor files. Make sure all files that may be impacted by a particular code provider are open in Visual Studio before applying it.
Was this page helpful?
Thanks for your feedback! Any other suggestions? Tell us here.