Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Does anybody know a way how to programatically obtain all referenced types of a Type object? I mean a similar funtion to Lutz Roeder's .NET Reflector's Analyzer -> Depends on... function but I need to utilize it from C# code.

 

Is an API for Lutz Roeder's .NET Reflector available? It must be since there are many Add-Ins available for it, but I can't find it...

 

Thanks in advance.

 

Daniel

  • Leaders
Posted

Try opening reflector with reflector. I don't know what is inside, but I know it runs on the .Net framework, so it is possible that Reflector.exe is the API.

 

As far as determining what classes another class depends on (without using third party libraries), all that should be involved is looping through all the members of a class and determining what types each field/property/return/parameter is.

[sIGPIC]e[/sIGPIC]
Posted
Try opening reflector with reflector. I don't know what is inside' date=' but I know it runs on the .Net framework, so it is possible that Reflector.exe [i']is[/i] the API.

 

I had the same idea, but Reflector's code seems to be obfuscated... :D

It is possible to see its dependencies - just .NET stuff, nothing else.

 

As far as determining what classes another class depends on (without using third party libraries), all that should be involved is looping through all the members of a class and determining what types each field/property/return/parameter is.

 

IMO examining the method/property signatures and the member types is not enough. What's about the types that are referenced by the implementation (property or method bodies) of the class?

 

It seems to me like Reflector is interpreting the MSIL byte code :o But there must be an API since there are so many AddIns for it...

Posted
I had the same idea' date=' but Reflector's code seems to be obfuscated...[/quote']Reflector isn't open source? I guess I never realized that until just now. I wonder why it is not.

 

With regards to add-ins, it might be worth checking out the add-ins workspace to see if there is some more info there.

  • Leaders
Posted
I had the same idea, but Reflector's code seems to be obfuscated... [/Quote]

You really ought to double check that. I noticed that many classes were obfuscated, but I also noticed dozens upon dozens of public classes and interfaces (specifically, in the CodeModel and CodeModel.Memory namespaces) where the only obfuscated members were private fields.

[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...