[corlib] Disable a test that is incompatible with how nunitlite runs tests
[mono.git] / mcs / class / corlib / System.Reflection.Emit / LocalBuilder.cs
index ae37eedcb4c26480ef746c4ba19b9e55f97befef..0c56edfb369ebfe7f56973b0d55eee044d7b76ad 100644 (file)
 
 using System;
 using System.Reflection;
-using System.Reflection.Emit;
 using System.Globalization;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 using System.Diagnostics.SymbolStore;
 
 namespace System.Reflection.Emit {
-#if NET_2_0
        [ComVisible (true)]
+#if !FULL_AOT_RUNTIME
        [ComDefaultInterface (typeof (_LocalBuilder))]
 #endif
        [ClassInterface (ClassInterfaceType.None)]
-#if NET_2_0
-       public sealed class LocalBuilder : LocalVariableInfo, _LocalBuilder {
-#else
-       public sealed class LocalBuilder : _LocalBuilder {
+       [StructLayout (LayoutKind.Sequential)]
+       public sealed class LocalBuilder : LocalVariableInfo
+#if !FULL_AOT_RUNTIME
+               , _LocalBuilder
 #endif
+       {
 
-#if NET_2_0
                // Some fields are already defined in LocalVariableInfo
                #region Sync with reflection.h
                private string name;
                #endregion
-#else
-               #region Sync with reflection.h
-               private Type type;
-               internal bool is_pinned;
-               internal ushort position;
-               private string name;
-               #endregion
-#endif
                
                internal ILGenerator ilgen;
                int startOffset;
@@ -77,29 +68,25 @@ namespace System.Reflection.Emit {
                        this.ilgen = ilgen;
                }
 
-               public void SetLocalSymInfo (string lname, int startOffset, int endOffset)
+               public void SetLocalSymInfo (string name, int startOffset, int endOffset)
                {
-                       name = lname;
+                       this.name = name;
                        this.startOffset = startOffset;
                        this.endOffset = endOffset;
                }
 
-               public void SetLocalSymInfo (string lname)
+               public void SetLocalSymInfo (string name)
                {
-                       SetLocalSymInfo (lname, 0, 0);
+                       SetLocalSymInfo (name, 0, 0);
                }
 
-#if NET_2_0
-               override
-#endif
-               public Type LocalType
+               public override Type LocalType
                {
                        get {
                                return type;
                        }
                }
 
-#if NET_2_0
                public override bool IsPinned
                {
                        get {
@@ -113,12 +100,6 @@ namespace System.Reflection.Emit {
                                return position;
                        }
                }
-#endif
-
-               internal static int Mono_GetLocalIndex (LocalBuilder builder)
-               {
-                       return builder.position;
-               }
 
                internal string Name {
                        get { return name; }
@@ -131,7 +112,7 @@ namespace System.Reflection.Emit {
                internal int EndOffset {
                        get { return endOffset; }
                }
-
+#if !FULL_AOT_RUNTIME
                void _LocalBuilder.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
                {
                        throw new NotImplementedException ();
@@ -151,5 +132,6 @@ namespace System.Reflection.Emit {
                {
                        throw new NotImplementedException ();
                }
+#endif
        }
 }