On 9 jan, 14:02, "Jb Evain" <[EMAIL PROTECTED]> wrote:
> Hey,
>
> On 1/9/08, Regis <[EMAIL PROTECTED]> wrote:
>
> > I submit an update in the Mono.Cecil library in order to manage
> > complex arrays with a rank other than 1 :
>
> Could you point me to a method I could test the new code against?


I have forgotten the following code I had to modify also in
Reflectionhelper.GetTypeSpec() method:

else if (t.IsArray) // deal with complex arrays
        elementType = new ArrayType (elementType /* R.Vaquette modified */,
t.GetArrayRank());

My code might be difficult to give in some lines.
In fact, the generated IL is:

.method public hidebysig static void  Main() cil managed
{
  .entrypoint
  // Code size       12 (0xc)
  .maxstack  3
  .locals init (string[0...,0...] V_0)
  IL_0000:  ldc.i4.5
  IL_0001:  ldc.i4.4
  IL_0002:  newobj     instance void string[0...,0...]::.ctor(int32,
                                                              int32)
  IL_0007:  stloc      V_0
  IL_000b:  ret
} // end of method DecalreArraysSample::Main




> > I have found a bug in MethodReference.cs in the ToString() method that
> > causes a method signature to differ from the one returned by the .NET
> > Framework:
>
> That's ok, it's not a bug. We're not looking for ToString
> compatibility with .net S.R.
>

In fact, it is a bug because the signature generated by this method is
different from the Reflectionhelper.GetMethodBaseSignature() return
value, so the GetMemberReference() doesn't find a previously added
reference.

--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to