10
10
using System . Runtime . CompilerServices ;
11
11
using System . Runtime . ExceptionServices ;
12
12
using Microsoft . Extensions . Internal ;
13
+ #nullable enable
13
14
14
15
namespace Microsoft . Extensions . StackTrace . Sources
15
16
{
16
17
internal class StackTraceHelper
17
18
{
18
- public static IList < StackFrameInfo > GetFrames ( Exception exception , out AggregateException error )
19
+ public static IList < StackFrameInfo > GetFrames ( Exception exception , out AggregateException ? error )
19
20
{
20
21
var frames = new List < StackFrameInfo > ( ) ;
21
22
@@ -35,7 +36,7 @@ public static IList<StackFrameInfo> GetFrames(Exception exception, out Aggregate
35
36
return frames ;
36
37
}
37
38
38
- List < Exception > exceptions = null ;
39
+ List < Exception > ? exceptions = null ;
39
40
40
41
for ( var i = 0 ; i < stackFrames . Length ; i ++ )
41
42
{
@@ -69,7 +70,7 @@ public static IList<StackFrameInfo> GetFrames(Exception exception, out Aggregate
69
70
return frames ;
70
71
}
71
72
72
- internal static MethodDisplayInfo GetMethodDisplayString ( MethodBase method )
73
+ internal static MethodDisplayInfo ? GetMethodDisplayString ( MethodBase ? method )
73
74
{
74
75
// Special case: no method available
75
76
if ( method == null )
@@ -145,7 +146,7 @@ internal static MethodDisplayInfo GetMethodDisplayString(MethodBase method)
145
146
return methodDisplayInfo ;
146
147
}
147
148
148
- private static bool ShowInStackTrace ( MethodBase method )
149
+ private static bool ShowInStackTrace ( MethodBase ? method )
149
150
{
150
151
Debug . Assert ( method != null ) ;
151
152
@@ -191,7 +192,7 @@ private static bool ShowInStackTrace(MethodBase method)
191
192
return true ;
192
193
}
193
194
194
- private static bool TryResolveStateMachineMethod ( ref MethodBase method , out Type declaringType )
195
+ private static bool TryResolveStateMachineMethod ( ref MethodBase method , out Type ? declaringType )
195
196
{
196
197
Debug . Assert ( method != null ) ;
197
198
Debug . Assert ( method . DeclaringType != null ) ;
0 commit comments