diff --git a/src/Shared/Shared.sln b/src/Shared/Shared.sln index b627de76e668..2c3727357dba 100644 --- a/src/Shared/Shared.sln +++ b/src/Shared/Shared.sln @@ -1,10 +1,12 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 16 +# Visual Studio Version 16 VisualStudioVersion = 16.0.0.0 MinimumVisualStudioVersion = 16.0.0.0 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Shared.Tests", "test\Shared.Tests\Microsoft.AspNetCore.Shared.Tests.csproj", "{06CD38EF-7733-4284-B3E4-825B6B63E1DD}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThrowingLibrary", "test\testassets\ThrowingLibrary\ThrowingLibrary.csproj", "{4799E505-5F83-4AB3-B96D-EACEB3528854}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {06CD38EF-7733-4284-B3E4-825B6B63E1DD}.Debug|Any CPU.Build.0 = Debug|Any CPU {06CD38EF-7733-4284-B3E4-825B6B63E1DD}.Release|Any CPU.ActiveCfg = Release|Any CPU {06CD38EF-7733-4284-B3E4-825B6B63E1DD}.Release|Any CPU.Build.0 = Release|Any CPU + {4799E505-5F83-4AB3-B96D-EACEB3528854}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4799E505-5F83-4AB3-B96D-EACEB3528854}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4799E505-5F83-4AB3-B96D-EACEB3528854}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4799E505-5F83-4AB3-B96D-EACEB3528854}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/Shared/StackTrace/StackFrame/ParameterDisplayInfo.cs b/src/Shared/StackTrace/StackFrame/ParameterDisplayInfo.cs index 1199a8386d2f..ae72c49bdb8f 100644 --- a/src/Shared/StackTrace/StackFrame/ParameterDisplayInfo.cs +++ b/src/Shared/StackTrace/StackFrame/ParameterDisplayInfo.cs @@ -1,17 +1,18 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Text; +#nullable enable namespace Microsoft.Extensions.StackTrace.Sources { internal class ParameterDisplayInfo { - public string Name { get; set; } + public string? Name { get; set; } - public string Type { get; set; } + public string? Type { get; set; } - public string Prefix { get; set; } + public string? Prefix { get; set; } public override string ToString() { diff --git a/src/Shared/StackTrace/StackFrame/StackFrameInfo.cs b/src/Shared/StackTrace/StackFrame/StackFrameInfo.cs index ffd91f213c08..ed8d0bc0ba7c 100644 --- a/src/Shared/StackTrace/StackFrame/StackFrameInfo.cs +++ b/src/Shared/StackTrace/StackFrame/StackFrameInfo.cs @@ -1,7 +1,8 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; +#nullable enable namespace Microsoft.Extensions.StackTrace.Sources { @@ -9,10 +10,10 @@ internal class StackFrameInfo { public int LineNumber { get; set; } - public string FilePath { get; set; } + public string? FilePath { get; set; } - public StackFrame StackFrame { get; set; } + public StackFrame? StackFrame { get; set; } - public MethodDisplayInfo MethodDisplayInfo { get; set; } + public MethodDisplayInfo? MethodDisplayInfo { get; set; } } } diff --git a/src/Shared/StackTrace/StackFrame/StackTraceHelper.cs b/src/Shared/StackTrace/StackFrame/StackTraceHelper.cs index 27aaf67ea178..5c38980109b3 100644 --- a/src/Shared/StackTrace/StackFrame/StackTraceHelper.cs +++ b/src/Shared/StackTrace/StackFrame/StackTraceHelper.cs @@ -132,7 +132,7 @@ public static IList GetFrames(Exception exception, out Aggregate parameterType = parameterType.GetElementType(); } - parameterTypeString = TypeNameHelper.GetTypeDisplayName(parameterType, fullName: false, includeGenericParameterNames: true); + parameterTypeString = TypeNameHelper.GetTypeDisplayName(parameterType!, fullName: false, includeGenericParameterNames: true); } return new ParameterDisplayInfo