Hello,

Is it possible to use .Net Reflector from another .Net program as a library? I know that one can make add-ons, but I want to do it the other way, i.e. use reflector capabilities of interpreting assemplies as a plugin for another program without the GUI.

Nelis
supernelis
0

Comments

3 comments

  • haleyjason
    You use to be able to ... and i'm pretty sure you still can - but when I did it back in 2007 Lutz said that it wasn't really a supported scenario.

    I posted a blog entry and some code about wrapping it with your own UI here:
    http://jasonhaley.com/blog/post/2007/10/26/Ways-to-use-Net-Reflector-3-Wrap-it.aspx
    haleyjason
    0
  • Alex D
    Yep, you can start with something like:
    Reflector.ApplicationManager m_AppManager = new Reflector.ApplicationManager(null);
    

    Then just don't call Run() on it if you don't want a reflector window.

    To get useful services, call things like:
    m_AppManager.GetService(typeof(ITranslatorManager))
    m_AppManager.GetService(typeof(ILanguageManager))
    m_AppManager.GetService(typeof(IAssemblyManager))
    m_AppManager.GetService(typeof(IAssemblyCache))
    m_AppManager.GetService(typeof(IConfigurationManager))
    

    Cheers,
    Alex D
    0
  • neh123us
    Here is another example of hosting reflector in your own code.

    http://www.simple-talk.com/dotnet/.net- ... plication/

    this can be a very useful technique.
    neh123us
    0

Add comment

Please sign in to leave a comment.