lundi 17 juin 2019

Running SQL-like queries on .net assembly metadata

I know the metadata of .net assemblies is stored in a tabular way, as described in ECMA-335. Has anyone developed a way to query this data using an SQL like language (or any query language!)?

The reason I want to do this is do ask questions about a code base such as:

  1. Give me the names of the classes and fieldnames where the type T occurs as a field.
  2. Give me the number of classes which have at least one field with a valuetype and at least one field with a reference type.
  3. Give me the number of occurences of this type as a field.

One solution might be to read the tables off the assembly, and load them into a SQL database, but this seems like a lot of work, if no one has done this before.





Aucun commentaire:

Enregistrer un commentaire