- Invert assignment direction
- Generate mapping
- Rename variable after type/expression
- Introduce parameter object
- MediatR add RequestHandler and Request
- Convert to full WPF property
- Encapsulate field for WPF
- Copy paste with conversion
Visual Studio code refactoring that allows swapping arguments around the equal sign in an assignment statement. It works on single or many selected assignment statements at once.
Visual Studio code refactoring that generates mapping code, between method input parameters and method return type. If any of them is void, "this" is used instead. Design time AutoMapper alternative.
What can be generated:
- mapping method
- copy constructor
- memento method get state
- memento method set state
- deconstruct method
General rules:
- mapping is available only for methods/constructors with an empty body
- mapping can be done for more than one input parameter
- for the left side of the assignment considered are all writable fields and properties
- for the right side of the assignment considered are all readable fields and properties
- for the assignment of mutable reference type, a "new" instance is always created
- recursive mapping is not, and will not be supported
- mapping to tuples is supported
- mapping to positional records is supported
Visual Studio code refactoring that changes a variable name, to an auto-generated name from the variable type or expression used in the assignment, e.g. "Foo x =" => "Foo foo ="
- works on:
- single or many variables at once
- single method parameter
- single invocation argument
- foreach loop variable
Visual Studio implementation of code refactoring Introduce Parameter Object from Martin Fowler's book "Refactoring, Improving the Design of Existing Code".
- it does not support generic type parameters
- updating a method body is done syntactically, not semantically, which means, conflicts may appear if a method parameter shares the same name with something else
Visual Studio code refactoring that adds Command class which implements MediatR IRequest<> interface and handler class which implements MediatR IRequestHandler<> interface. It only creates empty boilerplate code required by MediatR based on the selected method name and return type.
- does not support generic type parameters
version 1.5
- RequestHandler can also be generated from an existing Request class
Visual Studio code refactoring that replaces an auto-property with full property implementation that consists of invocation of OnPropertyChanged in a setter. It can convert many auto-properties at once.
Visual Studio code refactoring that creates full property implementation with an invocation of OnPropertyChanged in a setter for a selected set of backing fields.
Visual Studio extension that adds two commands to the text editor context menu that do case conversion before copy/paste.
Two kinds of conversion are available:
- Copy as sentence case (also splits selected text to separate words)
- PasteAsPascalCase