So with this in mind is my    module.GetTypeReferences(); hack still flaky?

Or is there another work around?

On Tue, Jan 11, 2011 at 10:26 PM, Jb Evain <[email protected]> wrote:
> Heh,
>
> On Tue, Jan 11, 2011 at 12:12 PM, Simon Cropp <[email protected]> wrote:
>> Attached is a solution illustrating the issue
>
> I understood the issue as soon as I ran the code. See, that's why we
> have fixmes and todos comments:
>
>                IMetadataScope GetTypeReferenceScope (MetadataToken scope)
>                {
>                        switch (scope.TokenType) {
>                        // FIXME: both assembly refs and module refs should be 
> in their
>                        // own arrays, in case of someone modify the 
> collections before
>                        // this code is called
>                        case TokenType.AssemblyRef:
>                                return module.AssemblyReferences [(int) 
> scope.RID - 1];
>                        case TokenType.ModuleRef:
>                                return module.ModuleReferences [(int) 
> scope.RID - 1];
>                        case TokenType.Module:
>                                return module;
>                        default:
>                                throw new NotSupportedException ();
>                        }
>                }
>
> Definitely a Cecil issue.
>
> Thanks!
>
> Jb
>
> --
> --
> mono-cecil

-- 
--
mono-cecil

Reply via email to