Compare commits

..

No commits in common. "8966d5c501a4a5fb3d56babbb14c85d9ba5a07dc" and "d4b3c869bbd4921d60b5a3c38beb45c9d9f4fc57" have entirely different histories.

17 changed files with 40 additions and 39 deletions

View File

@ -1,35 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!--package info-->
<PackageId>DTLib.Demystifier</PackageId>
<Version>1.1.0</Version>
<Description>netstandard fork of Ben.Demystifier</Description>
<PackageId>DTLib.Ben.Demystifier</PackageId>
<Version>1.0.2</Version>
<Authors>Timerix</Authors>
<Description>netstandard2.0 fork of Ben.Demystifier</Description>
<RepositoryType>GIT</RepositoryType>
<RepositoryUrl>https://timerix.ddns.net:3322/Timerix/DTLib.Demystifier</RepositoryUrl>
<PackageProjectUrl>https://timerix.ddns.net:3322/Timerix/DTLib.Demystifier</PackageProjectUrl>
<RepositoryUrl>https://github.com/Timerix22/DTLib.Ben.Demystifier</RepositoryUrl>
<PackageProjectUrl>https://github.com/Timerix22/DTLib.Ben.Demystifier</PackageProjectUrl>
<Configuration>Release</Configuration>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<!--compilation properties-->
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<!--compilation properties-->
<TargetFrameworks>net6.0;netstandard2.0;net48</TargetFrameworks>
<DebugType>embedded</DebugType>
<!--language features-->
<LangVersion>12</LangVersion>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<RootNamespace>DTLib.Demystifier</RootNamespace>
</PropertyGroup>
<!--external dependencies-->
<ItemGroup >
<PackageReference Include="System.Reflection.Metadata" Version="8.0.0" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<ItemGroup>
<PackageReference Include="System.Reflection.Metadata" Version="7.0.0" Condition="'$(TargetFramework)' != 'net6.0'" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" Condition="'$(TargetFramework)' != 'netstandard2.1'" />
</ItemGroup>
<!--copy pdb files from nuget packages to publish directory-->
<Target Name="IncludeSymbolFiles" AfterTargets="ResolveAssemblyReferences" Condition="@(ReferenceCopyLocalPaths) != ''">
<ItemGroup>
<ReferenceCopyLocalPaths Include="%(ReferenceCopyLocalPaths.RelativeDir)%(ReferenceCopyLocalPaths.Filename).pdb; %(ReferenceCopyLocalPaths.RelativeDir)%(ReferenceCopyLocalPaths.Filename).xml" />
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="!Exists('%(FullPath)')" />
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="!Exists('%(FullPath)')"/>
</ItemGroup>
</Target>
</Project>

View File

@ -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 DTLib.Demystifier;
namespace DTLib.Ben.Demystifier;
public class EnhancedStackFrame : StackFrame
{

View File

@ -8,10 +8,10 @@ using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using DTLib.Demystifier.Enumerable;
using DTLib.Demystifier.Internal;
using DTLib.Ben.Demystifier.Enumerable;
using DTLib.Ben.Demystifier.Internal;
namespace DTLib.Demystifier
namespace DTLib.Ben.Demystifier
{
public partial class EnhancedStackTrace
{
@ -425,7 +425,7 @@ namespace DTLib.Demystifier
}
catch
{
// https://github.com/benaadams/Demystifier/issues/32
// https://github.com/benaadams/Ben.Demystifier/issues/32
// Skip methods where il can't be interpreted
}
}

View File

@ -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 DTLib.Demystifier;
namespace DTLib.Ben.Demystifier;
public partial class EnhancedStackTrace : StackTrace, IEnumerable<EnhancedStackFrame>
{

View File

@ -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 DTLib.Demystifier.Enumerable;
namespace DTLib.Ben.Demystifier.Enumerable;
public static class EnumerableIList
{

View File

@ -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 DTLib.Demystifier.Enumerable;
namespace DTLib.Ben.Demystifier.Enumerable;
public struct EnumeratorIList<T> : IEnumerator<T>
{

View File

@ -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 DTLib.Demystifier.Enumerable;
namespace DTLib.Ben.Demystifier.Enumerable;
internal interface IEnumerableIList<T> : IEnumerable<T>
{

View File

@ -9,9 +9,9 @@ global using System.Diagnostics;
global using System.Reflection;
global using System.Linq;
using System.Diagnostics.Contracts;
using DTLib.Demystifier.Enumerable;
using DTLib.Ben.Demystifier.Enumerable;
namespace DTLib.Demystifier;
namespace DTLib.Ben.Demystifier;
public static class ExceptionExtensions
{

View File

@ -1,6 +1,6 @@
using System.Reflection.Emit;
namespace DTLib.Demystifier.Internal;
namespace DTLib.Ben.Demystifier.Internal;
internal class ILReader
{

View File

@ -6,7 +6,7 @@ using System.Reflection.Metadata;
using System.Reflection.Metadata.Ecma335;
using System.Reflection.PortableExecutable;
namespace DTLib.Demystifier.Internal;
namespace DTLib.Ben.Demystifier.Internal;
// Adapted from https://github.com/aspnet/Common/blob/dev/shared/Microsoft.Extensions.StackTrace.Sources/StackFrame/PortablePdbReader.cs
internal class PortablePdbReader : IDisposable

View File

@ -3,7 +3,7 @@
using System.Threading;
namespace DTLib.Demystifier.Internal;
namespace DTLib.Ben.Demystifier.Internal;
/// <summary>
/// A helper class that contains utilities methods for dealing with reflection.

View File

@ -1,6 +1,6 @@
# Demystifier
[![NuGet version (Demystifier)](https://img.shields.io/nuget/v/Demystifier.svg?style=flat-square)](https://www.nuget.org/packages/Demystifier/)
[![build](https://github.com/benaadams/Demystifier/workflows/Demystifier%20PR%20Build/badge.svg)](https://github.com/benaadams/Demystifier/actions)
# Ben.Demystifier
[![NuGet version (Ben.Demystifier)](https://img.shields.io/nuget/v/Ben.Demystifier.svg?style=flat-square)](https://www.nuget.org/packages/Ben.Demystifier/)
[![build](https://github.com/benaadams/Ben.Demystifier/workflows/Demystifier%20PR%20Build/badge.svg)](https://github.com/benaadams/Ben.Demystifier/actions)
Output the modern C# 7.0+ features in stack traces that looks like the C# source code that generated them rather than IL formatted.
@ -168,6 +168,6 @@ Which is far less helpful, and close to jibberish in places
To run benchmarks from the repository root:
```
dotnet run -p .\test\Demystifier.Benchmarks\ -c Release -f netcoreapp2.0 All
dotnet run -p .\test\Ben.Demystifier.Benchmarks\ -c Release -f netcoreapp2.0 All
```
<sub>Note: we're only kicking off via `netcoreapp2.0`, benchmarks will run for all configured platforms like `net462`.</sub>

View File

@ -1,9 +1,9 @@
// 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 DTLib.Demystifier.Enumerable;
using DTLib.Ben.Demystifier.Enumerable;
namespace DTLib.Demystifier;
namespace DTLib.Ben.Demystifier;
public class ResolvedMethod
{

View File

@ -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 DTLib.Demystifier;
namespace DTLib.Ben.Demystifier;
public class ResolvedParameter
{

View File

@ -1,9 +1,9 @@
// 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 DTLib.Demystifier.Enumerable;
using DTLib.Ben.Demystifier.Enumerable;
namespace DTLib.Demystifier;
namespace DTLib.Ben.Demystifier;
public static class StringBuilderExtentions
{

View File

@ -1,7 +1,7 @@
// 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.
namespace DTLib.Demystifier;
namespace DTLib.Ben.Demystifier;
// Adapted from https://github.com/aspnet/Common/blob/dev/shared/Microsoft.Extensions.TypeNameHelper.Sources/TypeNameHelper.cs
public static class TypeNameHelper

View File

@ -1,9 +1,9 @@
// 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 DTLib.Demystifier.Internal;
using DTLib.Ben.Demystifier.Internal;
namespace DTLib.Demystifier;
namespace DTLib.Ben.Demystifier;
public class ValueTupleResolvedParameter : ResolvedParameter
{