Imported Upstream version 4.3.2.467

Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
Xamarin Public Jenkins
2016-02-22 11:00:01 -05:00
parent f302175246
commit f3e3aab35a
4097 changed files with 122406 additions and 82300 deletions

View File

@@ -10,7 +10,6 @@ namespace System.Reflection
{
using System;
using System.Diagnostics;
using System.Diagnostics.Tracing;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -65,13 +64,6 @@ namespace System.Reflection
if (handle.IsNullHandle())
throw new ArgumentException(Environment.GetResourceString("Argument_InvalidHandle"));
#if !FEATURE_CORECLR && !MONO
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
{
FrameworkEventSource.Log.BeginGetMethodFromHandle();
}
#endif
#if MONO
MethodBase m = GetMethodFromHandleInternalType (handle.Value, IntPtr.Zero);
if (m == null)
@@ -81,14 +73,6 @@ namespace System.Reflection
#endif
Type declaringType = m.DeclaringType;
#if !FEATURE_CORECLR && !MONO
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage) && declaringType != null)
{
FrameworkEventSource.Log.EndGetMethodFromHandle(declaringType.GetFullNameForEtw(), m.GetFullNameForEtw());
}
#endif
if (declaringType != null && declaringType.IsGenericType)
throw new ArgumentException(String.Format(
CultureInfo.CurrentCulture, Environment.GetResourceString("Argument_MethodDeclaringTypeGeneric"),
@@ -103,29 +87,14 @@ namespace System.Reflection
if (handle.IsNullHandle())
throw new ArgumentException(Environment.GetResourceString("Argument_InvalidHandle"));
#if !FEATURE_CORECLR && !MONO
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
{
FrameworkEventSource.Log.BeginGetMethodFromHandle();
}
#endif
#if MONO
MethodBase m = GetMethodFromHandleInternalType (handle.Value, declaringType.Value);
if (m == null)
throw new ArgumentException ("The handle is invalid.");
#else
MethodBase m = RuntimeType.GetMethodBase(declaringType.GetRuntimeType(), handle.GetMethodInfo());
#endif
#if !FEATURE_CORECLR && !MONO
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage) && declaringType != null && m != null)
{
FrameworkEventSource.Log.EndGetMethodFromHandle(declaringType.GetRuntimeType().GetFullNameForEtw(), m.GetFullNameForEtw());
}
#endif
return m;
#else
return RuntimeType.GetMethodBase(declaringType.GetRuntimeType(), handle.GetMethodInfo());
#endif
}
#if MONO
@@ -171,7 +140,7 @@ namespace System.Reflection
return !(left == right);
}
#endif // !FEATURE_CORECLR
#if FEATURE_NETCORE || !FEATURE_CORECLR
public override bool Equals(object obj)
{
return base.Equals(obj);
@@ -181,7 +150,7 @@ namespace System.Reflection
{
return base.GetHashCode();
}
#endif //FEATURE_NETCORE || !FEATURE_CORECLR
#region Internal Members
// used by EE
[System.Security.SecurityCritical]
@@ -246,23 +215,6 @@ namespace System.Reflection
#endregion
#region _MethodBase Implementation
Type _MethodBase.GetType() { return base.GetType(); }
bool _MethodBase.IsPublic { get { return IsPublic; } }
bool _MethodBase.IsPrivate { get { return IsPrivate; } }
bool _MethodBase.IsFamily { get { return IsFamily; } }
bool _MethodBase.IsAssembly { get { return IsAssembly; } }
bool _MethodBase.IsFamilyAndAssembly { get { return IsFamilyAndAssembly; } }
bool _MethodBase.IsFamilyOrAssembly { get { return IsFamilyOrAssembly; } }
bool _MethodBase.IsStatic { get { return IsStatic; } }
bool _MethodBase.IsFinal { get { return IsFinal; } }
bool _MethodBase.IsVirtual { get { return IsVirtual; } }
bool _MethodBase.IsHideBySig { get { return IsHideBySig; } }
bool _MethodBase.IsAbstract { get { return IsAbstract; } }
bool _MethodBase.IsSpecialName { get { return IsSpecialName; } }
bool _MethodBase.IsConstructor { get { return IsConstructor; } }
#endregion
#region Public Members
[DebuggerStepThroughAttribute]
[Diagnostics.DebuggerHidden]
@@ -429,6 +381,23 @@ namespace System.Reflection
#endif
#endregion
#region _MethodBase Implementation
#if !FEATURE_CORECLR
Type _MethodBase.GetType() { return base.GetType(); }
bool _MethodBase.IsPublic { get { return IsPublic; } }
bool _MethodBase.IsPrivate { get { return IsPrivate; } }
bool _MethodBase.IsFamily { get { return IsFamily; } }
bool _MethodBase.IsAssembly { get { return IsAssembly; } }
bool _MethodBase.IsFamilyAndAssembly { get { return IsFamilyAndAssembly; } }
bool _MethodBase.IsFamilyOrAssembly { get { return IsFamilyOrAssembly; } }
bool _MethodBase.IsStatic { get { return IsStatic; } }
bool _MethodBase.IsFinal { get { return IsFinal; } }
bool _MethodBase.IsVirtual { get { return IsVirtual; } }
bool _MethodBase.IsHideBySig { get { return IsHideBySig; } }
bool _MethodBase.IsAbstract { get { return IsAbstract; } }
bool _MethodBase.IsSpecialName { get { return IsSpecialName; } }
bool _MethodBase.IsConstructor { get { return IsConstructor; } }
void _MethodBase.GetTypeInfoCount(out uint pcTInfo)
{
throw new NotImplementedException();
@@ -450,6 +419,8 @@ namespace System.Reflection
{
throw new NotImplementedException();
}
#endif
#endregion
}
}