I import a reflection's MethodInfo (of a concrete type) into a cecil's
MethodReference, then pass it down the drain for some specific processing.
At a later point, when I grab that MethodReference, and grab the information
about the type on which the method-reference belongs to. (I.e. type
custom-attributes etc, as well as to emit IL instructions to call
service-locator to locate an instance of that specific type that the
method-reference targets).
I just realized now that I don't have any way to get the information of what
type this method-reference targets. (Something I would normally do with
MethodInfo.ReflectedType). In Cecil, it seems I can only grab the
information of the DeclaringType of the method, which is not what I want.
Without this information out-of-the-box, I'll have to get around this by
creating a tuple class to pair the MethodReference and its ReflectedType
together, and refactor my project to use this (in leau of the standard
MethodReference class).

Thanks

On Fri, May 6, 2011 at 12:57 PM, Simon Cropp <[email protected]> wrote:

> I dont think such a concept exists in Cecil
>
> Can you give us a case where this would be useful for you?
>
> On Fri, May 6, 2011 at 12:10 PM, Hendry Luk <[email protected]> wrote:
> > Hi all,
> > I'm wondering if there's any equivalent of system.reflection's
> > MethodInfo.ReflectedType in mono-cecil? If not, is there any reason why
> > there shouldnt be?
> > Thanks
> >
> > --
> > --
> > mono-cecil
>
> --
> --
> mono-cecil

-- 
--
mono-cecil

Reply via email to