Compare commits

...

10 Commits

Author SHA1 Message Date
8966d5c501 v1.1.0 2024-09-20 02:25:26 +05:00
9efd9f0046 v1.1.0 2024-09-20 02:24:16 +05:00
a35e7630ca changed project name 2024-09-20 02:23:38 +05:00
9eaa322ae8 changed repository url 2024-09-20 01:55:11 +05:00
59de4eada9 target only netstandard 2.0 and 2.1 2024-09-20 01:42:17 +05:00
cfd755cd8c DTLib.Logging.Microsoft and dependency upgrade 2024-01-07 14:11:35 +06:00
ff33fe5395 target frameworks added dotnet8 2024-01-06 22:51:22 +06:00
45c48c408e removed dtlib internal logging 2024-01-05 23:12:14 +06:00
5d80b18be6 IsExternalInit disabled in new dotnet 2023-03-15 19:13:42 +06:00
76318a6ba4 net7.0 2023-02-24 23:50:01 +06:00
17 changed files with 39 additions and 40 deletions

View File

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

View File

@ -1,7 +1,7 @@
// Copyright (c) Ben A Adams. All rights reserved. // 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. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace DTLib.Ben.Demystifier; namespace DTLib.Demystifier;
public class EnhancedStackFrame : StackFrame public class EnhancedStackFrame : StackFrame
{ {

View File

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

View File

@ -1,7 +1,7 @@
// Copyright (c) Ben A Adams. All rights reserved. // 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. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace DTLib.Ben.Demystifier; namespace DTLib.Demystifier;
public partial class EnhancedStackTrace : StackTrace, IEnumerable<EnhancedStackFrame> public partial class EnhancedStackTrace : StackTrace, IEnumerable<EnhancedStackFrame>
{ {

View File

@ -1,7 +1,7 @@
// Copyright (c) Ben A Adams. All rights reserved. // 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. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace DTLib.Ben.Demystifier.Enumerable; namespace DTLib.Demystifier.Enumerable;
public static class EnumerableIList public static class EnumerableIList
{ {

View File

@ -1,7 +1,7 @@
// Copyright (c) Ben A Adams. All rights reserved. // 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. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace DTLib.Ben.Demystifier.Enumerable; namespace DTLib.Demystifier.Enumerable;
public struct EnumeratorIList<T> : IEnumerator<T> public struct EnumeratorIList<T> : IEnumerator<T>
{ {

View File

@ -1,7 +1,7 @@
// Copyright (c) Ben A Adams. All rights reserved. // 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. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace DTLib.Ben.Demystifier.Enumerable; namespace DTLib.Demystifier.Enumerable;
internal interface IEnumerableIList<T> : IEnumerable<T> internal interface IEnumerableIList<T> : IEnumerable<T>
{ {

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
# Ben.Demystifier # Demystifier
[![NuGet version (Ben.Demystifier)](https://img.shields.io/nuget/v/Ben.Demystifier.svg?style=flat-square)](https://www.nuget.org/packages/Ben.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/Ben.Demystifier/workflows/Demystifier%20PR%20Build/badge.svg)](https://github.com/benaadams/Ben.Demystifier/actions) [![build](https://github.com/benaadams/Demystifier/workflows/Demystifier%20PR%20Build/badge.svg)](https://github.com/benaadams/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. 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: To run benchmarks from the repository root:
``` ```
dotnet run -p .\test\Ben.Demystifier.Benchmarks\ -c Release -f netcoreapp2.0 All dotnet run -p .\test\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> <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. // 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. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using DTLib.Ben.Demystifier.Enumerable; using DTLib.Demystifier.Enumerable;
namespace DTLib.Ben.Demystifier; namespace DTLib.Demystifier;
public class ResolvedMethod public class ResolvedMethod
{ {

View File

@ -1,7 +1,7 @@
// Copyright (c) Ben A Adams. All rights reserved. // 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. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace DTLib.Ben.Demystifier; namespace DTLib.Demystifier;
public class ResolvedParameter public class ResolvedParameter
{ {

View File

@ -1,9 +1,9 @@
// Copyright (c) Ben A Adams. All rights reserved. // 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. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using DTLib.Ben.Demystifier.Enumerable; using DTLib.Demystifier.Enumerable;
namespace DTLib.Ben.Demystifier; namespace DTLib.Demystifier;
public static class StringBuilderExtentions public static class StringBuilderExtentions
{ {

View File

@ -1,7 +1,7 @@
// 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. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace DTLib.Ben.Demystifier; namespace DTLib.Demystifier;
// Adapted from https://github.com/aspnet/Common/blob/dev/shared/Microsoft.Extensions.TypeNameHelper.Sources/TypeNameHelper.cs // Adapted from https://github.com/aspnet/Common/blob/dev/shared/Microsoft.Extensions.TypeNameHelper.Sources/TypeNameHelper.cs
public static class TypeNameHelper public static class TypeNameHelper

View File

@ -1,9 +1,9 @@
// Copyright (c) Ben A Adams. All rights reserved. // 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. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using DTLib.Ben.Demystifier.Internal; using DTLib.Demystifier.Internal;
namespace DTLib.Ben.Demystifier; namespace DTLib.Demystifier;
public class ValueTupleResolvedParameter : ResolvedParameter public class ValueTupleResolvedParameter : ResolvedParameter
{ {