From 7add80ac1645bceef31cb34e9cf4019040191f25 Mon Sep 17 00:00:00 2001 From: Sean Dempsey Date: Sun, 10 Dec 2023 14:07:15 -0800 Subject: [PATCH] Support .NET 8 --- RandomizerCore/Logic/ILogicFormat.cs | 6 +----- RandomizerCore/RandomizerCore.csproj | 2 +- RandomizerCore/StringParsing/Exceptions.cs | 6 ++++++ RandomizerCoreTests/RandomizerCoreTests.csproj | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/RandomizerCore/Logic/ILogicFormat.cs b/RandomizerCore/Logic/ILogicFormat.cs index c828e44..6b98fb8 100644 --- a/RandomizerCore/Logic/ILogicFormat.cs +++ b/RandomizerCore/Logic/ILogicFormat.cs @@ -1,10 +1,5 @@ using RandomizerCore.Logic.StateLogic; using RandomizerCore.LogicItems; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace RandomizerCore.Logic { @@ -16,6 +11,7 @@ public interface ILogicFormat { /// /// Loads a collection of terms from a file. + /// IEnumerable<(string, TermType)> LoadTerms(Stream s); /// /// Loads a collection of waypoints from a file. diff --git a/RandomizerCore/RandomizerCore.csproj b/RandomizerCore/RandomizerCore.csproj index da91a24..d11b361 100644 --- a/RandomizerCore/RandomizerCore.csproj +++ b/RandomizerCore/RandomizerCore.csproj @@ -4,7 +4,7 @@ RandomizerCore 1.1.2.0 1.1.2.0 - netstandard2.1;net472;net6.0 + netstandard2.1;net472;net6.0;net8.0 true latest true diff --git a/RandomizerCore/StringParsing/Exceptions.cs b/RandomizerCore/StringParsing/Exceptions.cs index cf4b03f..ec4a48e 100644 --- a/RandomizerCore/StringParsing/Exceptions.cs +++ b/RandomizerCore/StringParsing/Exceptions.cs @@ -6,9 +6,12 @@ public class TokenizingException : Exception public TokenizingException() { } public TokenizingException(string message) : base(message) { } public TokenizingException(string message, Exception inner) : base(message, inner) { } + +#if !NET8_0_OR_GREATER protected TokenizingException( System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } +#endif } [Serializable] @@ -17,8 +20,11 @@ public class ParsingException : Exception public ParsingException() { } public ParsingException(string message) : base(message) { } public ParsingException(string message, Exception inner) : base(message, inner) { } + +#if !NET8_0_OR_GREATER protected ParsingException( System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } +#endif } } diff --git a/RandomizerCoreTests/RandomizerCoreTests.csproj b/RandomizerCoreTests/RandomizerCoreTests.csproj index b9f394e..f6c39e2 100644 --- a/RandomizerCoreTests/RandomizerCoreTests.csproj +++ b/RandomizerCoreTests/RandomizerCoreTests.csproj @@ -1,7 +1,7 @@ - net472;net6.0 + net472;net6.0;net8.0 enable enable latest