I have built custom IL Rewriter that inject custom code into some methods. Part of this injection, I want to instantiate the object of List<int>
. I already found the mdTokenRef for List~1.
From this mdTokenRef, how do I define or obtain TypeSpec? I could define the TypeSpecBlog as shown below for that. But, looking for an ICorProfiler API to find the TypeSpec.
COR_SIGNATURE sigListInt[] = { ELEMENT_TYPE_GENERICINST, ELEMENT_TYPE_CLASS, tdList, 0x01, ELEMENT_TYPE_I1 };