Skip to content

Delete StackTraceHelper code that won't fire #22419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/Shared/StackTrace/StackFrame/StackTraceHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
using Microsoft.Extensions.Internal;
#nullable enable

namespace Microsoft.Extensions.StackTrace.Sources
{
internal class StackTraceHelper
{
public static IList<StackFrameInfo> GetFrames(Exception exception, out AggregateException error)
public static IList<StackFrameInfo> GetFrames(Exception exception, out AggregateException? error)
{
var frames = new List<StackFrameInfo>();

Expand All @@ -35,7 +36,7 @@ public static IList<StackFrameInfo> GetFrames(Exception exception, out Aggregate
return frames;
}

List<Exception> exceptions = null;
List<Exception>? exceptions = null;

for (var i = 0; i < stackFrames.Length; i++)
{
Expand Down Expand Up @@ -69,7 +70,7 @@ public static IList<StackFrameInfo> GetFrames(Exception exception, out Aggregate
return frames;
}

internal static MethodDisplayInfo GetMethodDisplayString(MethodBase method)
internal static MethodDisplayInfo? GetMethodDisplayString(MethodBase? method)
{
// Special case: no method available
if (method == null)
Expand Down Expand Up @@ -145,7 +146,7 @@ internal static MethodDisplayInfo GetMethodDisplayString(MethodBase method)
return methodDisplayInfo;
}

private static bool ShowInStackTrace(MethodBase method)
private static bool ShowInStackTrace(MethodBase? method)
{
Debug.Assert(method != null);

Expand Down Expand Up @@ -191,7 +192,7 @@ private static bool ShowInStackTrace(MethodBase method)
return true;
}

private static bool TryResolveStateMachineMethod(ref MethodBase method, out Type declaringType)
private static bool TryResolveStateMachineMethod(ref MethodBase method, out Type? declaringType)
{
Debug.Assert(method != null);
Debug.Assert(method.DeclaringType != null);
Expand Down