Is it possible to select all the parameters of a method and ask ReSharper to create a class from those parameters as a "method parameter object?"
ReSharper supports the command Extract Class From Parameters:
The Extract Class From Parameters refactoring allows you to quickly create a new class or structure using (some of) the parameters of a given method. ReSharper analyses the selected method and detects the variables that can be converted into members. After extraction, the new class is created with the necessary fields generated from the selected method's parameters.
To invoke it:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With