Rory Becker - DevExpress CodeRush Blog

New CodeRush Plugin – Use Extension Method

Another plugin requested by our community

To paraphrase:

It would be great to have something that could recognise that an extension method was being called in the style of a normal method ie Method(Object, Params) and rewrite the call in the form of an extension method call. ie Object.Method(Params)

Ok well that seems simple enough:

Introducing the Use Extension Method Plugin

So given that we have an extension method like this:

UseExtensionMethodRequest1

… and some calling code looks like this :

UseExtensionMethodRequest2

The Use Extension Method plugin will add an option to your CodeRush SmartTag menu which will convert the method call in question to the following.

UseExtensionMethodRequest3

So where can I get this plugin?

As usual this plugin is available in 2 locations

GitHub: Here you will find the current (and historical) source of the plugin as well as the latest installable version.

The Visual Studio Gallery: Installing from the Visual Studio Gallery allows VS to locate any updates that are shipped after the initial release.

Published May 28 2014, 10:27 PM by
Bookmark and Share

Comments

Crono

Neat :)

May 29, 2014 10:15 AM
LIVE CHAT

Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

FOLLOW US

DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, Delphi, HTML5 or iOS & Android development. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2018 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners