ReSharper: find derived types constructor usages points
I have some base class ControlBase
and many derived classes which also have derived classes... Con开发者_C百科trolBase
and derived classes have parameterless constructor. How can I easily find all derived classes constructor invocation points? ReSharper find usages on ControlBase
constructor shows only usages of this base class constructor but not derived classes constructors.
Thanks.
You can achieve this by using the structural search feature in Resharper 5.
Go to Resharper/Find/Search with Pattern in the menu. Then enter the following pattern in the textbox on the left:
new $type$($args$)
The words enclosed by the Dollar signs are placeholders which have to be specified. You can do this by clicking on "Add Placeholder".
In your example you need a Type placeholder (name=type, Type=ControlBase, check "Or derived type") and an Argument placeholder (name=args).
精彩评论