all groups > dotnet clr > october 2004 >
You're in the

dotnet clr

group:

Reflection


Reflection Kaushik Srenevasan
10/2/2004 10:45:34 PM
dotnet clr:
Hi,

Is there a way to enumerate the strings, GUIDs, BLOBS from their respective
heaps using the reflection API supported by the Whidbey release?

Thanks,
Kaushik

Re: Reflection Justin Rogers
10/3/2004 1:52:39 AM
I can't be certain, but I see the beginnings of just such an API in the Beta 1
release.
It may already be there, and I just haven't passed over it yet. I think the
scenario
will be:

1. Reflection Only Load the assembly.
2. Enumerate Types and Attributes
3. Enumerate Type Members
4. Grab Member IL
5. Parse Member IL and turn tokens into usable form

You can get all the way up to 4 and 5, but I haven't been able to turn tokens
back
into reflection structures. I suspect this will change. No promises, just
suspecting
we'll get this type of access.


--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers

[quoted text, click to view]

Re: Reflection Justin Rogers
10/3/2004 1:34:53 PM
There are a number of internal scoped classes that just aren't available
yet. They include code for accessing all of the heaps. As for grabbing
the IL, it can be used to quickly and easily swap the behavior of dynamic
methods, which I think is the usage they are hoping for.

There are 15-20 classes that work on tokens and turn them into reflection
types, they are just internal for now. I imagine there was a number of
security concerns to be considered in Beta 1. If you want to play with them
early, use private reflection on a dev machine.


--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers

[quoted text, click to view]

Re: Reflection Kaushik Srenevasan
10/3/2004 2:46:16 PM
Without the API to turn tokens into reflection structures, its no use having
a method GetILAsByteStream ...
The only way out it seems, is to read and parse the heaps manually

Thanks,

--
Kaushik Srenevasan

[quoted text, click to view]

AddThis Social Bookmark Button