Imported Upstream version 4.2.2.10

Former-commit-id: 925376e1db46149d14f7949fcd7b08805ea8aba9
This commit is contained in:
Xamarin Public Jenkins
2015-12-18 19:40:30 -05:00
parent d11e8b35fd
commit 8cb7d04924
45 changed files with 399 additions and 122 deletions

View File

@@ -102,17 +102,7 @@ namespace System
public MethodInfo Method {
get {
if (method_info != null) {
return method_info;
} else {
if (method != IntPtr.Zero) {
if (!method_is_virtual)
method_info = (MethodInfo)MethodBase.GetMethodFromHandleNoGenericCheck (new RuntimeMethodHandle (method));
else
method_info = GetVirtualMethod_internal ();
}
return method_info;
}
return GetMethodImpl ();
}
}
@@ -511,7 +501,17 @@ namespace System
protected virtual MethodInfo GetMethodImpl ()
{
return Method;
if (method_info != null) {
return method_info;
} else {
if (method != IntPtr.Zero) {
if (!method_is_virtual)
method_info = (MethodInfo)MethodBase.GetMethodFromHandleNoGenericCheck (new RuntimeMethodHandle (method));
else
method_info = GetVirtualMethod_internal ();
}
return method_info;
}
}
// This is from ISerializable

View File

@@ -33,6 +33,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.Serialization;
using System.Runtime.InteropServices;
@@ -112,6 +113,14 @@ namespace System
return base.GetHashCode ();
}
protected override MethodInfo GetMethodImpl ()
{
if (delegates != null)
return delegates [delegates.Length - 1].Method;
return base.GetMethodImpl ();
}
// <summary>
// Return, in order of invocation, the invocation list
// of a MulticastDelegate