Browse Source

2003-11-11 Zoltan Varga <[email protected]>

	* MonoMethod.cs: Implement CallingConvention member.

svn path=/trunk/mcs/; revision=19830
Zoltan Varga 22 years ago
parent
commit
cbfcae3ec1

+ 4 - 0
mcs/class/corlib/System.Reflection/ChangeLog

@@ -1,3 +1,7 @@
+2003-11-11  Zoltan Varga  <[email protected]>
+
+	* MonoMethod.cs: Implement CallingConvention member.
+
 2003-11-10  Zoltan Varga  <[email protected]>
 
 	* Assembly.cs (InternalGetType): Add a 'module' argument so this

+ 18 - 1
mcs/class/corlib/System.Reflection/MonoMethod.cs

@@ -12,7 +12,7 @@ using System;
 using System.Globalization;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
-using System.Runtime.Serialization;
+using System.Runtime.Serialization;
 
 namespace System.Reflection {
 	
@@ -22,6 +22,7 @@ namespace System.Reflection {
 		internal Type ret;
 		internal MethodAttributes attrs;
 		internal MethodImplAttributes iattrs;
+		internal CallingConventions callconv;
 
 		[MethodImplAttribute(MethodImplOptions.InternalCall)]
 		internal static extern void get_method_info (IntPtr handle, out MonoMethodInfo info);
@@ -104,6 +105,14 @@ namespace System.Reflection {
 				return info.attrs;
 			} 
 		}
+
+		public override CallingConventions CallingConvention { 
+			get {
+				MonoMethodInfo info;
+				MonoMethodInfo.get_method_info (mhandle, out info);
+				return info.callconv;
+			}
+		}
 		
 		public override Type ReflectedType {
 			get {
@@ -216,6 +225,14 @@ namespace System.Reflection {
 				return info.attrs;
 			} 
 		}
+
+		public override CallingConventions CallingConvention { 
+			get {
+				MonoMethodInfo info;
+				MonoMethodInfo.get_method_info (mhandle, out info);
+				return info.callconv;
+			}
+		}
 		
 		public override Type ReflectedType {
 			get {