Merge pull request #3224 from ludovic-henry/iolayer-extract-wait-handle
[mono.git] / mcs / class / corlib / System.Reflection / MethodBody.cs
index 26090d01ff57874e1a981f973bd3760b7fe39c10..9cc5ca040de9ab23abed6cee1c109545a2e873cf 100644 (file)
@@ -26,7 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
 
 using System;
 using System.Collections.Generic;
@@ -35,7 +34,11 @@ using System.Runtime.InteropServices;
 
 namespace System.Reflection {
 
-       public sealed class MethodBody {
+       [ComVisible (true)]
+       [StructLayout (LayoutKind.Sequential)]
+       public
+       class MethodBody {
+#pragma warning disable 649
                #region Sync with reflection.h
                ExceptionHandlingClause[] clauses;
                LocalVariableInfo[] locals;
@@ -44,46 +47,60 @@ namespace System.Reflection {
                int sig_token;
                int max_stack;
                #endregion
+#pragma warning restore 649
 
-               internal MethodBody () {
+               protected
+               MethodBody () {
                }
 
-               public IList<ExceptionHandlingClause> ExceptionHandlingClauses {
+               public
+       virtual
+               IList<ExceptionHandlingClause> ExceptionHandlingClauses {
                        get {
                                return Array.AsReadOnly<ExceptionHandlingClause> (clauses);
                        }
                }
 
-               public IList<LocalVariableInfo> LocalVariables {
+               public
+               virtual
+               IList<LocalVariableInfo> LocalVariables {
                        get {
                                return Array.AsReadOnly<LocalVariableInfo> (locals);
                        }
                }
 
-               public bool InitLocals {
+               public
+               virtual
+               bool InitLocals {
                        get {
                                return init_locals;
                        }
                }
 
-               public int LocalSignatureMetadataToken {
+               public
+               virtual
+               int LocalSignatureMetadataToken {
                        get {
                                return sig_token;
                        }
                }
 
-               public int MaxStackSize {
+
+               public
+               virtual
+               int MaxStackSize {
                        get {
                                return max_stack;
                        }
                }
 
-               public byte[] GetILAsByteArray () {
+               public
+               virtual
+               byte[] GetILAsByteArray () {
                        return il;
                }
        }
 
 }
 
-#endif