File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 2
2
using System ;
3
3
using System . Collections . Generic ;
4
4
using System . Diagnostics ;
5
+ using System . Diagnostics . CodeAnalysis ;
5
6
using System . Globalization ;
6
7
using System . IO ;
7
8
using System . Linq ;
@@ -43,7 +44,8 @@ internal static class DiagnosticsExtensions
43
44
{ typeof ( GDTaskVoid ) , "GDTaskVoid" }
44
45
} ;
45
46
46
- public static string CleanupAsyncStackTrace ( this StackTrace stackTrace )
47
+ [ RequiresUnreferencedCode ( "Calls System.Diagnostics.StackFrame.GetMethod()" ) ]
48
+ public static string CleanupAsyncStackTrace ( this StackTrace stackTrace )
47
49
{
48
50
if ( stackTrace == null ) return "" ;
49
51
@@ -120,15 +122,15 @@ public static string CleanupAsyncStackTrace(this StackTrace stackTrace)
120
122
return sb . ToString ( ) ;
121
123
}
122
124
123
-
124
125
static bool IsAsync ( MethodBase methodInfo )
125
126
{
126
127
var declareType = methodInfo . DeclaringType ;
127
128
return typeof ( IAsyncStateMachine ) . IsAssignableFrom ( declareType ) ;
128
129
}
129
130
130
- // code from Ben.Demystifier/EnhancedStackTrace.Frame.cs
131
- static bool TryResolveStateMachineMethod ( ref MethodBase method , out Type declaringType )
131
+ // code from Ben.Demystifier/EnhancedStackTrace.Frame.cs
132
+ [ RequiresUnreferencedCode ( "Calls System.Type.GetMethods()" ) ]
133
+ static bool TryResolveStateMachineMethod ( ref MethodBase method , out Type declaringType )
132
134
{
133
135
declaringType = method . DeclaringType ;
134
136
You can’t perform that action at this time.
0 commit comments