1010using System . Runtime . CompilerServices ;
1111using System . Runtime . ExceptionServices ;
1212using Microsoft . Extensions . Internal ;
13+ #nullable enable
1314
1415namespace Microsoft . Extensions . StackTrace . Sources
1516{
1617 internal class StackTraceHelper
1718 {
18- public static IList < StackFrameInfo > GetFrames ( Exception exception , out AggregateException error )
19+ public static IList < StackFrameInfo > GetFrames ( Exception exception , out AggregateException ? error )
1920 {
2021 var frames = new List < StackFrameInfo > ( ) ;
2122
@@ -35,7 +36,7 @@ public static IList<StackFrameInfo> GetFrames(Exception exception, out Aggregate
3536 return frames ;
3637 }
3738
38- List < Exception > exceptions = null ;
39+ List < Exception > ? exceptions = null ;
3940
4041 for ( var i = 0 ; i < stackFrames . Length ; i ++ )
4142 {
@@ -69,7 +70,7 @@ public static IList<StackFrameInfo> GetFrames(Exception exception, out Aggregate
6970 return frames ;
7071 }
7172
72- internal static MethodDisplayInfo GetMethodDisplayString ( MethodBase method )
73+ internal static MethodDisplayInfo ? GetMethodDisplayString ( MethodBase ? method )
7374 {
7475 // Special case: no method available
7576 if ( method == null )
@@ -145,7 +146,7 @@ internal static MethodDisplayInfo GetMethodDisplayString(MethodBase method)
145146 return methodDisplayInfo ;
146147 }
147148
148- private static bool ShowInStackTrace ( MethodBase method )
149+ private static bool ShowInStackTrace ( MethodBase ? method )
149150 {
150151 Debug . Assert ( method != null ) ;
151152
@@ -191,7 +192,7 @@ private static bool ShowInStackTrace(MethodBase method)
191192 return true ;
192193 }
193194
194- private static bool TryResolveStateMachineMethod ( ref MethodBase method , out Type declaringType )
195+ private static bool TryResolveStateMachineMethod ( ref MethodBase method , out Type ? declaringType )
195196 {
196197 Debug . Assert ( method != null ) ;
197198 Debug . Assert ( method . DeclaringType != null ) ;
0 commit comments