How can we help you today? How can we help you today?

Need '/select' command line key usage example

I have 'DummyConsole.exe' assembly loaded into the Reflector assembly list.

How can I launch Reflector using '/select'command line key to make it open some specific method/field from this assembly on startup?

When I use something like:
D:\programs\reflector.exe /select:"DummyConsole.ConsoleWriter"
it works just fine opening ConsoleWriter class in the assembly browser.

But how can I open specific member of this class?

Thanks for your help.
kbabiy
0

Comments

7 comments

  • James Moore
    Hi,

    you can do this in the following way (using the M: prefix):

    == For pure methods ==
    Reflector.exe /select:M:System.Object.GetType

    == For methods with arguments ===
    Reflector.exe /select:M:System.Object.Equals(System.Object)

    Hope this helps,

    James
    James Moore
    0
  • kbabiy
    Thanks, that really helped.
    Here is the list of prefixes I found:
    Delegate = 'T',
    Event = 'E',
    Field = 'F',
    Method = 'M',
    Property = 'P'

    Question: how to open a consrtructor this way?
    I tried something like:
    Reflector.exe /select:C:System.Object.ctor

    But it didn't work :-/
    kbabiy
    0
  • kbabiy
    James
    Could you please write how to open a consrtructor this way? I tried several ways, but it didn't work.

    Thank you very much.
    kbabiy
    0
  • James Moore
    Hi there,

    I have had a dig through the code today, unfortunately there is a bit of a bug when it comes to handling '.' in function names in that code. I have put together a tentative fix but need to spend a little more time on it before checking it in - it should make it into the next release though.

    In the mean time you can use the code:// based selection model. To do this run:

    reflector.exe /select:code://mscorlib/System.Object/.ctor()

    Thanks for finding this bug and I'm sorry this hasn't been easier for you,

    Regards,

    James
    James Moore
    0
  • James Moore
    As an additional pointer:
    You can get the code:// form for any element by selecting it in the hierarchy and hitting ctrl-alt-c, the full URL will then be put on your clipboard (you can often delete a few elements of the URL and it will still work).

    If you want code:// URLs to work from IE etc then run reflector.exe /register and it will register itself as the url handler for code:// url's.

    James
    James Moore
    0
  • kbabiy
    Thank you VERY MUCH. This last one was most useful
    kbabiy
    0
  • odalet
    James Moore wrote:
    You can get the code:// form for any element by selecting it in the hierarchy and hitting ctrl-alt-c, the full URL will then be put on your clipboard (you can often delete a few elements of the URL and it will still work).

    This one didn't work for me: I'm using a French Vista 32bits box.
    odalet
    0

Add comment

Please sign in to leave a comment.