Oh I just realized that the MetadataToken of both the actual TypeDefinitions
themselves are actually equal. I assume I can just compare these, instead of
inspecting the Scope.MetadataToken + FullName?

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

> That's great! So I suppose I'll just compare typeDef.FullName and
> typeDef.Scope.MetadataToken to determine the equalities between 2 types.
> Can you see any obvious problem from this?
>
> Thanks for the help
>
>
> On Tue, Jul 12, 2011 at 11:00 PM, Jb Evain <[email protected]> wrote:
>
>> On Tue, Jul 12, 2011 at 2:52 PM, Hendry Luk <[email protected]> wrote:
>> > 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.
>>
>> Then you'd have to find out why you have two instances of the same
>> AssemblyDefinition.
>>
>> >> 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?
>>
>> Nope, MetadataToken are unique within a module.
>>
>> Jb
>>
>> --
>> --
>> mono-cecil
>
>
>

-- 
--
mono-cecil

Reply via email to