From 02b1a75d1e066f6cf9ef4a3168c77f8c5928f9bb Mon Sep 17 00:00:00 2001 From: glax Date: Sat, 1 Jun 2024 23:51:38 +0200 Subject: [PATCH] Downgrade LangVer to 11.0 for net7.0 --- GlaxArguments/ArgumentFetcher.cs | 2 +- GlaxArguments/GlaxArguments.csproj | 5 +++-- Test/Program.cs | 15 ++++++++------- Test/Test.csproj | 3 ++- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/GlaxArguments/ArgumentFetcher.cs b/GlaxArguments/ArgumentFetcher.cs index dae9181..f51dd43 100644 --- a/GlaxArguments/ArgumentFetcher.cs +++ b/GlaxArguments/ArgumentFetcher.cs @@ -4,7 +4,7 @@ public class ArgumentFetcher { public Argument[] ValidArguments; - private static readonly Argument HelpArg = new(["-h", "--help"], 0, "Print this help text."); + private static readonly Argument HelpArg = new(new []{"-h", "--help"}, 0, "Print this help text."); public ArgumentFetcher(IEnumerable arguments) { diff --git a/GlaxArguments/GlaxArguments.csproj b/GlaxArguments/GlaxArguments.csproj index 1df4793..597152a 100644 --- a/GlaxArguments/GlaxArguments.csproj +++ b/GlaxArguments/GlaxArguments.csproj @@ -1,14 +1,15 @@  - net8.0 enable enable Defines and Parses Arguments for programs. https://github.com/C9Glax/GlaxArguments https://github.com/C9Glax/GlaxArguments git - 1.0.1 + 1.1.0 + net8.0;net7.0 + 11 diff --git a/Test/Program.cs b/Test/Program.cs index 90f1639..5c62d24 100644 --- a/Test/Program.cs +++ b/Test/Program.cs @@ -1,12 +1,13 @@ using GlaxArguments; -Argument[] arguments = -[ - new (["-t", "--test"], 0, "Test arg"), - new (["--test1"], 1, "Test arg with 1 parameter"), - new (["--test2"], 2, "Test arg with 2 parameters"), - new (["--test3"], 0, "Test arg") -]; +Argument[] arguments = new[] +{ + new Argument(new []{"-t", "--test"}, 0, "Test arg"), + new Argument(new []{"--test1"}, 1, "Test arg with 1 parameter"), + new Argument(new []{"--test2"}, 2, "Test arg with 2 parameters"), + new Argument(new []{"--test3"}, 0, "Test arg") + +}; ArgumentFetcher fetcher = new(arguments); Dictionary fetched = fetcher.Fetch("-h"); foreach(KeyValuePair arg in fetched) diff --git a/Test/Test.csproj b/Test/Test.csproj index 4a2441a..baebf21 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -2,9 +2,10 @@ Exe - net8.0 enable enable + net8.0 + 11