You've already forked linux-packaging-mono
Imported Upstream version 4.3.2.467
Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Tracing;
|
||||
|
||||
namespace System.Reflection
|
||||
{
|
||||
@@ -23,155 +22,46 @@ namespace System.Reflection
|
||||
public static IEnumerable<PropertyInfo> GetRuntimeProperties(this Type type)
|
||||
{
|
||||
CheckAndThrow(type);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.BeginGetRuntimeProperties(type.GetFullNameForEtw());
|
||||
}
|
||||
#endif
|
||||
IEnumerable<PropertyInfo> properties = type.GetProperties(everything);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.EndGetRuntimeProperties(type.GetFullNameForEtw());
|
||||
}
|
||||
#endif
|
||||
return properties;
|
||||
|
||||
return type.GetProperties(everything);
|
||||
}
|
||||
public static IEnumerable<EventInfo> GetRuntimeEvents(this Type type)
|
||||
{
|
||||
CheckAndThrow(type);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.BeginGetRuntimeEvents(type.GetFullNameForEtw());
|
||||
}
|
||||
#endif
|
||||
IEnumerable<EventInfo> events = type.GetEvents(everything);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.EndGetRuntimeEvents(type.GetFullNameForEtw());
|
||||
}
|
||||
#endif
|
||||
return events;
|
||||
return type.GetEvents(everything);
|
||||
}
|
||||
|
||||
public static IEnumerable<MethodInfo> GetRuntimeMethods(this Type type)
|
||||
{
|
||||
CheckAndThrow(type);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.BeginGetRuntimeMethods(type.GetFullNameForEtw());
|
||||
}
|
||||
#endif
|
||||
IEnumerable<MethodInfo> methods = type.GetMethods(everything);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.EndGetRuntimeMethods(type.GetFullNameForEtw());
|
||||
}
|
||||
#endif
|
||||
return methods;
|
||||
return type.GetMethods(everything);
|
||||
}
|
||||
|
||||
public static IEnumerable<FieldInfo> GetRuntimeFields(this Type type)
|
||||
{
|
||||
CheckAndThrow(type);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.BeginGetRuntimeFields(type.GetFullNameForEtw());
|
||||
}
|
||||
#endif
|
||||
IEnumerable<FieldInfo> fields = type.GetFields(everything);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.EndGetRuntimeFields(type.GetFullNameForEtw());
|
||||
}
|
||||
#endif
|
||||
|
||||
return fields;
|
||||
return type.GetFields(everything);
|
||||
}
|
||||
|
||||
public static PropertyInfo GetRuntimeProperty(this Type type, string name)
|
||||
{
|
||||
CheckAndThrow(type);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.BeginGetRuntimeProperty(type.GetFullNameForEtw(), name != null ? name : "");
|
||||
}
|
||||
#endif
|
||||
|
||||
PropertyInfo pi = type.GetProperty(name);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.EndGetRuntimeProperty(type.GetFullNameForEtw(), pi != null ? pi.GetFullNameForEtw() : "");
|
||||
}
|
||||
#endif
|
||||
|
||||
return pi;
|
||||
return type.GetProperty(name);
|
||||
}
|
||||
public static EventInfo GetRuntimeEvent(this Type type, string name)
|
||||
{
|
||||
CheckAndThrow(type);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.BeginGetRuntimeEvent(type.GetFullNameForEtw(), name != null ? name : "");
|
||||
}
|
||||
#endif
|
||||
EventInfo ei = type.GetEvent(name);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.EndGetRuntimeEvent(type.GetFullNameForEtw(), ei != null ? ei.GetFullNameForEtw() : "");
|
||||
}
|
||||
#endif
|
||||
|
||||
return ei;
|
||||
return type.GetEvent(name);
|
||||
}
|
||||
public static MethodInfo GetRuntimeMethod(this Type type, string name, Type[] parameters)
|
||||
{
|
||||
CheckAndThrow(type);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.BeginGetRuntimeMethod(type.GetFullNameForEtw(), name != null ? name : "");
|
||||
}
|
||||
#endif
|
||||
MethodInfo mi = type.GetMethod(name, parameters);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.EndGetRuntimeMethod(type.GetFullNameForEtw(), mi != null ? mi.GetFullNameForEtw() : "");
|
||||
}
|
||||
#endif
|
||||
|
||||
return mi;
|
||||
return type.GetMethod(name, parameters);
|
||||
}
|
||||
public static FieldInfo GetRuntimeField(this Type type, string name)
|
||||
{
|
||||
CheckAndThrow(type);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.BeginGetRuntimeField(type.GetFullNameForEtw(), name != null ? name : "");
|
||||
}
|
||||
#endif
|
||||
FieldInfo fi = type.GetField(name);
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage))
|
||||
{
|
||||
FrameworkEventSource.Log.EndGetRuntimeField(type.GetFullNameForEtw(), fi != null ? fi.GetFullNameForEtw() : "");
|
||||
}
|
||||
#endif
|
||||
|
||||
return fi;
|
||||
return type.GetField(name);
|
||||
}
|
||||
public static MethodInfo GetRuntimeBaseDefinition(this MethodInfo method){
|
||||
CheckAndThrow(method);
|
||||
|
Reference in New Issue
Block a user