mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-07-08 18:06:41 +00:00
Add .NET Standard 2.0 and 2.1
This commit is contained in:
@@ -23,7 +23,7 @@ namespace InfoPrint
|
||||
// Loop through the input paths
|
||||
foreach (string inputPath in options.InputPaths)
|
||||
{
|
||||
#if NETFRAMEWORK
|
||||
#if NETFRAMEWORK || NETSTANDARD2_0_OR_GREATER
|
||||
PrintPathInfo(inputPath, false, options.Debug);
|
||||
#else
|
||||
PrintPathInfo(inputPath, options.Json, options.Debug);
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace SabreTools.Serialization.Deserializers
|
||||
return 0;
|
||||
|
||||
// Match the version to header length
|
||||
#if NET472_OR_GREATER || NETCOREAPP
|
||||
#if NET472_OR_GREATER || NETCOREAPP || NETSTANDARD2_0_OR_GREATER
|
||||
return (version, length) switch
|
||||
{
|
||||
(1, Constants.HeaderV1Size) => version,
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace SabreTools.Serialization.Deserializers
|
||||
}
|
||||
|
||||
// Split the line for the name iteratively
|
||||
#if NETFRAMEWORK || NETCOREAPP3_1
|
||||
#if NETFRAMEWORK || NETCOREAPP3_1 || NETSTANDARD2_0_OR_GREATER
|
||||
string[] lineParts = line.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (lineParts.Length == 1)
|
||||
lineParts = line.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
|
||||
@@ -99,7 +99,7 @@ namespace SabreTools.Serialization.Deserializers
|
||||
if (trimmedLine == null)
|
||||
continue;
|
||||
|
||||
#if NETFRAMEWORK || NETCOREAPP3_1
|
||||
#if NETFRAMEWORK || NETCOREAPP3_1 || NETSTANDARD2_0_OR_GREATER
|
||||
lineParts = trimmedLine.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
#else
|
||||
lineParts = trimmedLine.Split(' ', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
#if NET35_OR_GREATER || NETCOREAPP
|
||||
#if NET35_OR_GREATER || NETCOREAPP || NETSTANDARD2_0_OR_GREATER
|
||||
using System.Linq;
|
||||
#endif
|
||||
using System.Text;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace SabreTools.Serialization.Deserializers
|
||||
var settings = new XmlReaderSettings
|
||||
{
|
||||
CheckCharacters = false,
|
||||
#if NET40_OR_GREATER || NETCOREAPP
|
||||
#if NET40_OR_GREATER || NETCOREAPP || NETSTANDARD2_0_OR_GREATER
|
||||
DtdProcessing = DtdProcessing.Ignore,
|
||||
#endif
|
||||
ValidationFlags = XmlSchemaValidationFlags.None,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Assembly Properties -->
|
||||
<TargetFrameworks>net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
|
||||
<TargetFrameworks>net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0;netstandard2.0;netstandard2.1</TargetFrameworks>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<CheckEolTargetFramework>false</CheckEolTargetFramework>
|
||||
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace SabreTools.Serialization.Serializers
|
||||
Encoding = Encoding.UTF8,
|
||||
Indent = true,
|
||||
IndentChars = "\t",
|
||||
#if NET40_OR_GREATER || NETCOREAPP
|
||||
#if NET40_OR_GREATER || NETCOREAPP || NETSTANDARD2_0_OR_GREATER
|
||||
NamespaceHandling = NamespaceHandling.OmitDuplicates,
|
||||
#endif
|
||||
NewLineChars = "\n",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
#if NET35_OR_GREATER || NETCOREAPP
|
||||
#if NET35_OR_GREATER || NETCOREAPP || NETSTANDARD2_0_OR_GREATER
|
||||
using System.Linq;
|
||||
#endif
|
||||
using System.Text;
|
||||
|
||||
Reference in New Issue
Block a user