The Push Members Down refactoring helps push type members from a base type down the inheritance chain to an inheritor. This operation is useful when you want to specialize behavior in a certain type hierarchy.
ReSharper analyzes all members of the selected type and makes the list of members that you can push down. Before completing the refactoring, ReSharper also checks for possible conflicts, for example, whether the members you are trying to push down will be accessible in the destination type.
Reverse functionality is available with the
- Position the caret at any of the type members that you want to push down.
- Choose ReSharper | Refactor | Push Members Down. The Push Members Down wizard opens:
- Select destination types from the list at the top of the wizard.
- In the Select members list, select members of the current type
that you want to push down. Optionally, click one of the following buttons:
- All Public to select all public members of the current type.
- Dependent to select members that are referenced by any other previously selected members.
- For any member, select Make abstract (if applicable) to make the original member abstract and move its implementation to the newly created overriding member.
- Click Next. If no conflicts are found, the refactoring is
performed immediately. Otherwise,