I would like to add a Visual Studio 2015 code snippet or equivalent, which changes several places in a C # class. Conceptually, I want him to implement an interface in an existing class.
Creating a code fragment in C # is not a problem - it will add implementation methods.
However, I would also like to:
- Add
using: using ABC = com.whatever;to the beginning of the file. - Add link for
com.whatever. - Add interface:
ABC.IBarto createpublic class Foo : Form, ABC.IBar Add one or more comments to the class: for example, [System.Runtime.InteropServices.ComVisible(true)]
Add some private members only under existing private members to support implementation methods, no matter where I add implementation methods.
The documentation assumes that at least the use and link functionality (the first two points) is supported only for VB.
Is there a way to do something or all for C # in VS2015? This is not necessary for the VS2015 code snippet, but it indicates what I'm trying to achieve. An alternative would also be interesting, for example, the ability to write ABC.IBarand get a hook to call the implementation interface.
A reserve is simply to make element templates for a partial class, but the ability to mix with an existing implementation will be very useful.
source
share