c# - Mono.Cecil TypeReference to Type? -
is there anyways go typereference in mono.cecil type?
in terms of "what's in box" can have other way round, using moduledefinition.import api.
to go typereference system.type need manually using reflection , assemblyqualifiedname. aware cecil uses il conventions escape nested classes etc, need apply manual correction.
if want resolve non-generic, non-nested types should fine though.
to go typereference typedefition (if that's meant) need to typereference.resolve();
requested code sample:
typereference tr = ... type.gettype(tr.fullname + ", " + tr.module.assembly.fullname); // in assemnblies loaded current appdomain , fire appdomain.resolve event if no type found the conventions used in reflection explained here, cecils conventions consult cecil source code.
Comments
Post a Comment