Yes. Import just returns a new reference scoped for the module.

The tables are computed at write time using the object graph of the module.

Jb

On Tue, Feb 17, 2015 at 11:15 AM, Alex Rønne Petersen <[email protected]> wrote:
> Hey Jb,
>
> Is this even the case if I do mod.Import (typeRef) ? I was under the
> impression that this method was for something along the lines of this,
> but maybe I'm just misremembering.
>
> Regards,
> Alex
>
> On Tue, Feb 17, 2015 at 11:01 AM, Jb Evain <[email protected]> wrote:
>> Hey Alex,
>>
>> I'm pretty sure this won't work. The TypeRef, MemberRef and TypeSpec
>> tables are computed based on their usage.
>>
>> Jb
>>
>> On Tue, Feb 17, 2015 at 5:08 AM, Alex Rønne Petersen <[email protected]> wrote:
>>> Hi,
>>>
>>> A tool that I'm working on requires stripping all methods of variables and
>>> instructions. At the same time, however, I'd like to preserve all type,
>>> method, etc references that those instructions or variables referred to. In
>>> a similar vein, I'd like to import some type references into the module and
>>> have them stay around even if not explicitly used.
>>>
>>> Does Cecil support this scenario? Is there anything I need to do to make
>>> sure these references don't disappear when the module is written back to
>>> disk?
>>>
>>> Thanks!
>>>
>>> Regards,
>>> Alex
>>>
>>> --
>>> --
>>> --
>>> mono-cecil
>>> ---
>>> You received this message because you are subscribed to the Google Groups
>>> "mono-cecil" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> --
>> --
>> mono-cecil
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "mono-cecil" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> --
> mono-cecil
> ---
> You received this message because you are subscribed to the Google Groups 
> "mono-cecil" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
--
mono-cecil
--- 
You received this message because you are subscribed to the Google Groups 
"mono-cecil" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to