Rory Becker - DevExpress CodeRush Blog

New CodeRush Plugin – Add Data Contract

A customer recently requested a way to quickly add the [DataContract] and [DataMember] attributes to the active class.

Naturally we were happy to oblige.

The Add Data Contract plugin provides a new CodeProvider available when your caret is within the name of any class.

When invoked, it will add the [DataContract] attribute to the active class, and decorate it’s properties with the [DataMember] attribute.

AddDataContract

Naturally we also:

  • Add a reference to System.Runtime.Serialization.dll
  • Add the System.Runtime.Serialization namespace.

Where do I get this Plugin?

This plugin is available on GitHub or via the Visual Studio Gallery

Published Mar 27 2014, 09:00 PM by
Bookmark and Share

Comments

Orhan ÖCAL

very quick and very nice

March 28, 2014 2:28 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, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. 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-2017 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners