Hi,

When you call generic methods indirectly, you specify the method's
signature explicitly:

"Calling a generic method instantiation indirectly is a different
story. To call a method
(generic or not) indirectly, you need to load a function pointer to
this method and then execute
an indirect call on this function pointer. You reference the generic
method instantiation
only when you load the function pointer to it; after that you work
with the pointer and not
with the instantiation. The function pointer itself and the indirect
call instruction carry the
signature of the method as it became an instantiation. They have to,
because they carry no
reference to the method instantiation. The following example
illustrates my point."

- Expert .NET 2.0 IL Assembler, p. 280 "Calling Generic Methods"

Regards,
Alex

On Thu, Aug 4, 2011 at 3:34 PM, Jb Evain <[email protected]> wrote:
> Hi,
>
> On Thu, Aug 4, 2011 at 3:25 PM, Timwi <[email protected]> wrote:
>> It seems that, now that CallSite no longer derives from
>> MethodReference, it has lost the ability to have generic parameters.
>>
>> It seems to me that it needs a GenericParameters property similar to
>> the existing Parameters property (i.e. just forward to
>> signature.GenericParameters).
>>
>> I think it would also need to implement IGenericParameterProvider.
>
> Hm.
>
> Could you post a sample that worked before the change and is now
> impossible to represent?
>
> Thanks,
>
> Jb
>
> --
> --
> mono-cecil

-- 
--
mono-cecil

Reply via email to