1
0

Downgrade LangVer to 11.0 for net7.0

This commit is contained in:
glax 2024-06-01 23:51:38 +02:00
parent 2848fd1982
commit 02b1a75d1e
4 changed files with 14 additions and 11 deletions

View File

@ -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<Argument> arguments)
{

View File

@ -1,14 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>Defines and Parses Arguments for programs.</Description>
<PackageProjectUrl>https://github.com/C9Glax/GlaxArguments</PackageProjectUrl>
<RepositoryUrl>https://github.com/C9Glax/GlaxArguments</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Version>1.0.1</Version>
<Version>1.1.0</Version>
<TargetFrameworks>net8.0;net7.0</TargetFrameworks>
<LangVersion>11</LangVersion>
</PropertyGroup>
</Project>

View File

@ -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<Argument, string[]> fetched = fetcher.Fetch("-h");
foreach(KeyValuePair<Argument, string[]> arg in fetched)

View File

@ -2,9 +2,10 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>11</LangVersion>
</PropertyGroup>
<ItemGroup>