[Mono-dev] TypeForwardedFrom
Robert Jordan
robertj at gmx.net
Thu Apr 11 17:21:38 UTC 2013
Neale,
Rename & Modify WriteAssembly to take a Type argument:
public int WriteTypeAssembly (BinaryWriter writer, Type type)
{
return WriteAssemblyName (writer, type.GetAssemblyName ());
}
(GetAssemblyName () is the extension from my first post)
Then change all call sites such that they pass the type directly
instead type.Assembly to WriteTypeAssembly. Don't forget
CodeGenerator.cs, where things get nastier due to IL code
generation ;)
Robert
On 11.04.2013 17:48, Neale Ferguson wrote:
> Thanks again and apologies for peppering you with questions. In
> WriteAssemblyName() it retrieves the AssemblyFullName so I'm not sure how I
> can get the forwarded name without the associated Type value.
>
> Neale
>
> On 4/11/13 10:04 AM, "Robert Jordan" <robertj at gmx.net> wrote:
>
>> Neale,
>>
>> The icall's declaration:
>>
>> mono/metadata/icall-def.h:ICALL(ASSEM_23, "get_fullname",
>> ves_icall_System_Reflection_Assembly_get_fullName)
>>
>> The function:
>>
>> mono/metadata/icall.c:ves_icall_System_Reflection_Assembly_get_fullName
>> (MonoReflectionAssembly *assembly)
>>
>>
>> I won't add this overhead to the Assembly class because it's a Type
>> feature after all. You can handle this locally in ObjectWriter,
>> as this is the only place where TypeForwardedFrom is used at all.
>
>
More information about the Mono-devel-list
mailing list