Ok thanks, good to know that I'm not re-implementing something. For what I'm doing it's pretty useful because I'm taking those generic functions and creating wrappers for them in some cases, and in others I have to know whether to box return types or not, with the correct type declaration for the box operation of course. If I have some kind of cleaned up solution for this in the future, would you want me to submit a pull request to add this to cecil rocks or something?
Thanks again, John On Friday, September 28, 2012 3:19:48 AM UTC-4, Jb Evain wrote: > > Hey, > > What is usually done is to create a mapping for the current generic > context between the generic parameters and the generic arguments. > This way you are able to “resolve” (not in the Cecil .Resolve() sense) > a generic parameter into its argument (that may or not be a generic > parameter). > > There's nothing that Cecil exposes, nor a recommended/preferred way, to do > that. > > Best, > > Jb > > On Fri, Sep 28, 2012 at 9:03 AM, John Marshall > <[email protected] <javascript:>> wrote: > > I'm having the same issue. It looks like GenericParameters like !!0 can > be > > resolved to actual TypeDefinitions by using the GenericArguments which > > specify <int,int> for instance, but is there a proper way to do this? My > > current implementation works, but feels hackish because it has to > > recursively iterate a type's argument's looking for GenericParameters to > > replace with actual TypeDefinitions. > > > > Thanks, John > > > > www.codeperspective.com :) > > > > -- > > -- > > mono-cecil > -- -- mono-cecil
