Title covers it all. I'd like classes which implement IDisposable to show up in a specific color so I can know if I should wrap them in a using block. Is there a setting or a process by which you can extend the IDE?
I assume this will become easier/extension-free once Roslyn comes out, but this is presently not easy because you can't access the code as C# from an extension easily.
In Resharper it's easy, though! My example was tested in ReSharper 9.0. Sadly, there's no easy way to give this to you.
new $disp$($args$)
Type
, name: disp
, type: System.IDisposable
Arguments
, name: args
Save and you'll now get a "suggestion" whenever a new disposable is being constructed.
Adding the pattern $disp$ $var$ = $exp$;
could also be helpful.
Type
, name: disp
, type: System.IDisposable
Expression
, name: exp
Identifier
, name: var
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With