Hey,

On Thu, Sep 9, 2010 at 5:43 PM, Johannes Rudolph
<[email protected]> wrote:
> ModuleDefinition.Read and ModuleDefinition.Import handle generic type
> arguments for an open generic type differently. ModuleDefinition.Read does
> it correctly while ModuleDenifition.Import does not import the generic
> parameter name correctly:

Nope.

> I am positive this has just something to do with the Importer. What are your
> thoughts?

Positive is good :) Now what going on there? You're asking Cecil to
import the type:

Dictionary<string, TValue>

Without any other information. When it will stumble onto TValue, Cecil
can not relate TValue to anything that is known at this time. So it
tries it best (and gets it wrong in this case).

You have to provide a context to Import when importing open types, so
Cecil can know where to get the generic parameters.

-- 
Jb EvainĀ  <[email protected]>

-- 
--
mono-cecil

Reply via email to