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.
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