Update for new frameworks
This commit is contained in:
@@ -663,8 +663,13 @@ namespace System.Diagnostics
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (type == typeof(Task))
|
||||
if (type == typeof(Task) || type.DeclaringType == typeof(Task))
|
||||
{
|
||||
if (method.Name.Contains(".cctor"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (method.Name)
|
||||
{
|
||||
case "ExecuteWithThreadLocal":
|
||||
@@ -672,15 +677,24 @@ namespace System.Diagnostics
|
||||
case "ExecutionContextCallback":
|
||||
case "ExecuteEntry":
|
||||
case "InnerInvoke":
|
||||
case "ExecuteEntryUnsafe":
|
||||
case "ExecuteFromThreadPool":
|
||||
case "s_ecCallback":
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (type == typeof(ExecutionContext))
|
||||
{
|
||||
if (method.Name.Contains(".cctor"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (method.Name)
|
||||
{
|
||||
case "RunInternal":
|
||||
case "Run":
|
||||
case "RunFromThreadPoolDispatchLoop":
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,9 +60,8 @@ namespace System.Diagnostics
|
||||
}
|
||||
|
||||
var genericPartIndex = type.Name.IndexOf('`');
|
||||
Debug.Assert(genericPartIndex >= 0);
|
||||
|
||||
return type.Name.Substring(0, genericPartIndex);
|
||||
return (genericPartIndex >= 0) ? type.Name.Substring(0, genericPartIndex) : type.Name;
|
||||
}
|
||||
|
||||
private static void ProcessType(StringBuilder builder, Type type, DisplayNameOptions options)
|
||||
|
||||
Reference in New Issue
Block a user