Automatically insert attribute above C# property in VS2015
<p>I'd like to create some sort of Visual Studio add on where I could hover over a line like:</p>

<pre><code>public int counter {get; set;}
</code></pre>

<p>and upon selecting my menu item (or light bulb), it would insert a line similar to the following above it:</p>

<pre><code>[DataMember Order=1]
public int counter {get; set;}
</code></pre>

<p>I found this example:
<a href="https://msdn.microsoft.com/en-us/library/dn903708.aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/dn903708.aspx</a></p>

<p>but I'm not sure it's taking me in the right direction. I was thinking that adding a menu item might make sense (so I could bind it to a keyboard shortcut), but the tricky part would be intelligently setting the "Order" parameter based on an observation of other instances of that attribute nearby.</p>

<p>Any suggestions?</p>