Just to clarify the first part of my previous email.
My code had already used DefaultAssemblyResolver from the start, but it
still seems that I get 2 different TypeDefinitions for the same type.

On Tue, Jul 12, 2011 at 10:50 PM, Hendry Luk <[email protected]> wrote:

> Yes thats what I've done. I use DefaultAssemblyResolver to also specify the
> SearchDirectories for the assemblies, and all my assemblies are read using
> this parameter.
> Is that supposed to cache by default?
>
> Another related question, i found a MetadataToken under typeDef.Scope,with
> a unique uid, and i suspect it is used to uniquely identify the scope (and i
> checked that in my case, both types' scopes have the same metadata-token).
> I'm not quite sure what MetadataToken really means, but am I correct to
> assume that no 2 different modules will have the same MetadataToken?
> Cheers
>
>
> On Tue, Jul 12, 2011 at 10:46 PM, Jb Evain <[email protected]> wrote:
>
>> On Tue, Jul 12, 2011 at 2:44 PM, Hendry Luk <[email protected]> wrote:
>> > I can't quite find anything about caching-resolver out of the box. Is it
>> > something that I need to implement myself? Is there any implementation
>> that
>> > I can reuse?
>>
>> Yes.
>>
>> var resolver = new DefaultAssemblyResolver();
>>
>> Then you make sure that all your assemblies are read with
>>
>> new ReaderParameters {
>>    AssemblyResolver = resolver,
>> };
>>
>> --
>> --
>> mono-cecil
>
>
>

-- 
--
mono-cecil

Reply via email to