diff --git a/src/Ben.Demystifier/Ben.Demystifier.csproj b/src/Ben.Demystifier/Ben.Demystifier.csproj index 42bb2b2..ebc33c9 100644 --- a/src/Ben.Demystifier/Ben.Demystifier.csproj +++ b/src/Ben.Demystifier/Ben.Demystifier.csproj @@ -1,56 +1,16 @@ - Ben Core - Ben.Demystifier - High performance understanding for stack traces (Make error logs more productive) - Ben Adams - https://github.com/benaadams/Ben.Demystifier - https://github.com/benaadams/Ben.Demystifier - Apache-2.0 - git - true embedded true enable true - true - readme.md - - - netstandard2.1;netstandard2.0;net45;net6.0 - true - key.snk - icon.png - - true - - - - 5.0.0 - + - - - - <_Parameter1>$(AssemblyName).Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001005532489e147c0de0c5872048d20f7acf99d172a599d217950eba8fdbd1f98fa5ac47901b076d2bd7da8d436e6b5d6292694902e9748514bb0c3b17e6a0e0386f22447847c1c5cd9e034f79a8fe1c120a12785f7f79617414e63861cf13d6fd1cbb4211b87202c6a52c1e22962a6bd310413c37ca440fad14ab8422707517fbae - - - - - - True - \ - - - True - \ - - diff --git a/src/Ben.Demystifier/EnhancedStackFrame.cs b/src/Ben.Demystifier/EnhancedStackFrame.cs index 2fb8fc4..f54ffdb 100644 --- a/src/Ben.Demystifier/EnhancedStackFrame.cs +++ b/src/Ben.Demystifier/EnhancedStackFrame.cs @@ -3,7 +3,7 @@ using System.Reflection; -namespace System.Diagnostics +namespace Ben.Demystifier { public class EnhancedStackFrame : StackFrame { diff --git a/src/Ben.Demystifier/EnhancedStackTrace.Frames.cs b/src/Ben.Demystifier/EnhancedStackTrace.Frames.cs index 033dcbe..b224152 100644 --- a/src/Ben.Demystifier/EnhancedStackTrace.Frames.cs +++ b/src/Ben.Demystifier/EnhancedStackTrace.Frames.cs @@ -3,10 +3,10 @@ // 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.Collections; -using System.Collections.Generic; -using System.Collections.Generic.Enumerable; -using System.Diagnostics.Internal; +global using System.Collections; +global using System.Collections.Generic; +using Ben.Demystifier.Enumerable; +using Ben.Demystifier.Internal; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; @@ -15,7 +15,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -namespace System.Diagnostics +namespace Ben.Demystifier { public partial class EnhancedStackTrace { diff --git a/src/Ben.Demystifier/EnhancedStackTrace.cs b/src/Ben.Demystifier/EnhancedStackTrace.cs index d81a9c0..933e60d 100644 --- a/src/Ben.Demystifier/EnhancedStackTrace.cs +++ b/src/Ben.Demystifier/EnhancedStackTrace.cs @@ -3,11 +3,11 @@ using System.Collections; using System.Collections.Generic; -using System.Collections.Generic.Enumerable; +using Ben.Demystifier.Enumerable; using System.IO; using System.Text; -namespace System.Diagnostics +namespace Ben.Demystifier { public partial class EnhancedStackTrace : StackTrace, IEnumerable { diff --git a/src/Ben.Demystifier/Enumerable/EnumerableIList.cs b/src/Ben.Demystifier/Enumerable/EnumerableIList.cs index ef883df..478219a 100644 --- a/src/Ben.Demystifier/Enumerable/EnumerableIList.cs +++ b/src/Ben.Demystifier/Enumerable/EnumerableIList.cs @@ -1,7 +1,7 @@ // Copyright (c) Ben A Adams. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace System.Collections.Generic.Enumerable +namespace Ben.Demystifier.Enumerable { public static class EnumerableIList { diff --git a/src/Ben.Demystifier/Enumerable/EnumeratorIList.cs b/src/Ben.Demystifier/Enumerable/EnumeratorIList.cs index a80ff8b..3629166 100644 --- a/src/Ben.Demystifier/Enumerable/EnumeratorIList.cs +++ b/src/Ben.Demystifier/Enumerable/EnumeratorIList.cs @@ -1,7 +1,7 @@ // Copyright (c) Ben A Adams. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace System.Collections.Generic.Enumerable +namespace Ben.Demystifier.Enumerable { public struct EnumeratorIList : IEnumerator { diff --git a/src/Ben.Demystifier/Enumerable/IEnumerableIList.cs b/src/Ben.Demystifier/Enumerable/IEnumerableIList.cs index 93f6947..13e848a 100644 --- a/src/Ben.Demystifier/Enumerable/IEnumerableIList.cs +++ b/src/Ben.Demystifier/Enumerable/IEnumerableIList.cs @@ -1,7 +1,7 @@ // Copyright (c) Ben A Adams. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace System.Collections.Generic.Enumerable +namespace Ben.Demystifier.Enumerable { interface IEnumerableIList : IEnumerable { diff --git a/src/Ben.Demystifier/ExceptionExtensions.cs b/src/Ben.Demystifier/ExceptionExtensions.cs index 63fb8cd..ce88c02 100644 --- a/src/Ben.Demystifier/ExceptionExtensions.cs +++ b/src/Ben.Demystifier/ExceptionExtensions.cs @@ -1,12 +1,15 @@ // Copyright (c) Ben A Adams. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +global using System.Diagnostics; +global using System; +using System.Diagnostics.Contracts; using System.Collections.Generic; -using System.Collections.Generic.Enumerable; +using Ben.Demystifier.Enumerable; using System.Reflection; using System.Text; -namespace System.Diagnostics +namespace Ben.Demystifier { public static class ExceptionExtensions { @@ -56,7 +59,7 @@ namespace System.Diagnostics /// Unlike this method is pure. It calls first, /// computes a demystified string representation and then restores the original state of the exception back. /// - [Contracts.Pure] + [Pure] public static string ToStringDemystified(this Exception exception) => new StringBuilder().AppendDemystified(exception).ToString(); } diff --git a/src/Ben.Demystifier/Internal/ILReader.cs b/src/Ben.Demystifier/Internal/ILReader.cs index 44d2570..29bc436 100644 --- a/src/Ben.Demystifier/Internal/ILReader.cs +++ b/src/Ben.Demystifier/Internal/ILReader.cs @@ -1,7 +1,7 @@ using System.Reflection; using System.Reflection.Emit; -namespace System.Diagnostics.Internal +namespace Ben.Demystifier.Internal { internal class ILReader { diff --git a/src/Ben.Demystifier/Internal/PortablePdbReader.cs b/src/Ben.Demystifier/Internal/PortablePdbReader.cs index f81e490..5eab488 100644 --- a/src/Ben.Demystifier/Internal/PortablePdbReader.cs +++ b/src/Ben.Demystifier/Internal/PortablePdbReader.cs @@ -8,7 +8,7 @@ using System.Reflection.Metadata; using System.Reflection.Metadata.Ecma335; using System.Reflection.PortableExecutable; -namespace System.Diagnostics.Internal +namespace Ben.Demystifier.Internal { // Adapted from https://github.com/aspnet/Common/blob/dev/shared/Microsoft.Extensions.StackTrace.Sources/StackFrame/PortablePdbReader.cs internal class PortablePdbReader : IDisposable diff --git a/src/Ben.Demystifier/Internal/ReflectionHelper.cs b/src/Ben.Demystifier/Internal/ReflectionHelper.cs index 123dc85..7f484d2 100644 --- a/src/Ben.Demystifier/Internal/ReflectionHelper.cs +++ b/src/Ben.Demystifier/Internal/ReflectionHelper.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Reflection; using System.Threading; -namespace System.Diagnostics.Internal +namespace Ben.Demystifier.Internal { /// /// A helper class that contains utilities methods for dealing with reflection. diff --git a/src/Ben.Demystifier/ResolvedMethod.cs b/src/Ben.Demystifier/ResolvedMethod.cs index 6f095e2..1fb4fb8 100644 --- a/src/Ben.Demystifier/ResolvedMethod.cs +++ b/src/Ben.Demystifier/ResolvedMethod.cs @@ -1,11 +1,11 @@ // 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.Collections.Generic.Enumerable; +using Ben.Demystifier.Enumerable; using System.Reflection; using System.Text; -namespace System.Diagnostics +namespace Ben.Demystifier { public class ResolvedMethod { diff --git a/src/Ben.Demystifier/ResolvedParameter.cs b/src/Ben.Demystifier/ResolvedParameter.cs index 1457d92..9433c85 100644 --- a/src/Ben.Demystifier/ResolvedParameter.cs +++ b/src/Ben.Demystifier/ResolvedParameter.cs @@ -3,7 +3,7 @@ using System.Text; -namespace System.Diagnostics +namespace Ben.Demystifier { public class ResolvedParameter { diff --git a/src/Ben.Demystifier/StringBuilderExtentions.cs b/src/Ben.Demystifier/StringBuilderExtentions.cs index 5eeb8e0..55d01e2 100644 --- a/src/Ben.Demystifier/StringBuilderExtentions.cs +++ b/src/Ben.Demystifier/StringBuilderExtentions.cs @@ -1,10 +1,10 @@ // Copyright (c) Ben A Adams. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System.Collections.Generic.Enumerable; +using Ben.Demystifier.Enumerable; using System.Text; -namespace System.Diagnostics +namespace Ben.Demystifier { public static class StringBuilderExtentions { diff --git a/src/Ben.Demystifier/TypeNameHelper.cs b/src/Ben.Demystifier/TypeNameHelper.cs index 95e59c0..8e36e35 100644 --- a/src/Ben.Demystifier/TypeNameHelper.cs +++ b/src/Ben.Demystifier/TypeNameHelper.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Text; -namespace System.Diagnostics +namespace Ben.Demystifier { // Adapted from https://github.com/aspnet/Common/blob/dev/shared/Microsoft.Extensions.TypeNameHelper.Sources/TypeNameHelper.cs public static class TypeNameHelper diff --git a/src/Ben.Demystifier/ValueTupleResolvedParameter.cs b/src/Ben.Demystifier/ValueTupleResolvedParameter.cs index 7dacf13..26e0daf 100644 --- a/src/Ben.Demystifier/ValueTupleResolvedParameter.cs +++ b/src/Ben.Demystifier/ValueTupleResolvedParameter.cs @@ -2,10 +2,10 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; -using System.Diagnostics.Internal; +using Ben.Demystifier.Internal; using System.Text; -namespace System.Diagnostics +namespace Ben.Demystifier { public class ValueTupleResolvedParameter : ResolvedParameter { diff --git a/src/Ben.Demystifier/key.snk b/src/Ben.Demystifier/key.snk deleted file mode 100644 index 9367ae1..0000000 Binary files a/src/Ben.Demystifier/key.snk and /dev/null differ