Merge pull request #593 from tibel/define-NETCORE-removed

remove NETCORE constant
This commit is contained in:
Alexandre Mutel
2022-02-05 14:38:17 +01:00
committed by GitHub
5 changed files with 5 additions and 19 deletions

View File

@@ -19,8 +19,6 @@ using System.Runtime.CompilerServices;
* Please note the lack of a Remove method on this data structure
*/
// Relies on NETCORE being set for selective use of Spans
//namespace SharpCollections.Generic
namespace Markdig.Helpers
{

View File

@@ -69,7 +69,7 @@ namespace Markdig.Helpers
utf32 -= 65536;
return new string(
#if NETCORE
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
stackalloc
#else
new

View File

@@ -34,18 +34,6 @@
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Memory" Version="4.5.4" />
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
<DefineConstants>$(DefineConstants);NETCORE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<DefineConstants>$(DefineConstants);NETCORE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<DefineConstants>$(DefineConstants);NETCORE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<None Include="../../img/markdig.png" Pack="true" PackagePath="" />

View File

@@ -5,7 +5,7 @@
namespace System.Diagnostics.CodeAnalysis
{
#if !NETCORE
#if !NETSTANDARD2_1_OR_GREATER && !NETCOREAPP3_1_OR_GREATER
internal sealed class DoesNotReturnAttribute : Attribute { }
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]

View File

@@ -102,7 +102,7 @@ namespace Markdig.Renderers
}
protected bool previousWasLine;
#if !NETCORE
#if !NETSTANDARD2_1_OR_GREATER && !NETCOREAPP3_1_OR_GREATER
private char[] buffer;
#endif
private readonly List<Indent> indents;
@@ -113,7 +113,7 @@ namespace Markdig.Renderers
/// <param name="writer">The writer.</param>
protected TextRendererBase(TextWriter writer) : base(writer)
{
#if !NETCORE
#if !NETSTANDARD2_1_OR_GREATER && !NETCOREAPP3_1_OR_GREATER
buffer = new char[1024];
#endif
// We assume that we are starting as if we had previously a newline
@@ -263,7 +263,7 @@ namespace Markdig.Renderers
WriteIndent();
previousWasLine = false;
#if NETCORE
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Writer.Write(content.AsSpan(offset, length));
#else
if (offset == 0 && content.Length == length)