You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to generate a Method with exactly the same ParameterDef and return type as MethodSpec, but the parameters obtained through methodSpec.GetParams() has generic type, such as T, U, how can I get its real type?
The text was updated successfully, but these errors were encountered:
Access the GenericInstMethodSig property of MethodSpec. It contains the instantiation of the generic parameters (in order the same as generic method arguments). If you want to create an instantiated type, you must traverse the TypeSig structure until you find a GenericMVar and substitute it with the signature from the list. An example implementation of this can be found in ConfuserEx, see https://github.com/mkaring/ConfuserEx/blob/master/Confuser.Renamer/GenericArgumentResolver.cs
I want to generate a
Method
with exactly the sameParameterDef
and return type asMethodSpec
, but the parameters obtained throughmethodSpec.GetParams()
has generic type, such asT
,U
, how can I get its real type?The text was updated successfully, but these errors were encountered: