X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FSystem.Reflection%2FMethodBody.cs;h=9cc5ca040de9ab23abed6cee1c109545a2e873cf;hb=ac194553049b2eeb328f5fc54b708da9b95f4d88;hp=e3553fa16027748059cf7b2db72ce452ba09ef91;hpb=b6b13e72e91d5b529a6306ce53bda685932c77db;p=mono.git diff --git a/mcs/class/corlib/System.Reflection/MethodBody.cs b/mcs/class/corlib/System.Reflection/MethodBody.cs index e3553fa1602..9cc5ca040de 100644 --- a/mcs/class/corlib/System.Reflection/MethodBody.cs +++ b/mcs/class/corlib/System.Reflection/MethodBody.cs @@ -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,10 +34,11 @@ using System.Runtime.InteropServices; namespace System.Reflection { -#if NET_2_0 [ComVisible (true)] -#endif - public sealed class MethodBody { + [StructLayout (LayoutKind.Sequential)] + public + class MethodBody { +#pragma warning disable 649 #region Sync with reflection.h ExceptionHandlingClause[] clauses; LocalVariableInfo[] locals; @@ -47,46 +47,60 @@ namespace System.Reflection { int sig_token; int max_stack; #endregion +#pragma warning restore 649 - internal MethodBody () { + protected + MethodBody () { } - public IList ExceptionHandlingClauses { + public + virtual + IList ExceptionHandlingClauses { get { return Array.AsReadOnly (clauses); } } - public IList LocalVariables { + public + virtual + IList LocalVariables { get { return Array.AsReadOnly (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