What you're using there is the internal API - this is unsupported, undocumented, not exposed in intellisense, and the most important thing is it's subject to change at any release. If you're happy using this in the current release and its working for you, then just be aware that in a future release your add-in might bomb, so make sure you recompile on all future releases and re-code/redistribute if necessary.
Cheers,