It is straightforward to get the list of the types defined in an assembly: assembly.GetTypes()
.
What I am interested in is the list of types currently loaded by the runtime. More specifically, I would like to get the list of the closed generic types that are loaded.
I suppose that the CLR keeps a list of the loaded types. I think that I could use CLR MD to get this list, but I would like to get and use the list in the current process. Using CLR MD, I would have to start an external process, capture the loaded types list, dump it to a file, and then read it from the active process.
Is there a debugging or diagnostic API that provides the list of loaded types for the current process?
Aucun commentaire:
Enregistrer un commentaire