KuiperZone.Utility.Yaap 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package KuiperZone.Utility.Yaap --version 1.0.0                
NuGet\Install-Package KuiperZone.Utility.Yaap -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="KuiperZone.Utility.Yaap" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add KuiperZone.Utility.Yaap --version 1.0.0                
#r "nuget: KuiperZone.Utility.Yaap, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install KuiperZone.Utility.Yaap as a Cake Addin
#addin nuget:?package=KuiperZone.Utility.Yaap&version=1.0.0

// Install KuiperZone.Utility.Yaap as a Cake Tool
#tool nuget:?package=KuiperZone.Utility.Yaap&version=1.0.0                

Yaap

Yaap is yet another argument parser for C# .NET. It is licensed as GPL-3.0-or-later.

SEE CLASS: KuiperZone.Utility.ArgumentParser

Argument keys are to be prefixed with '-' or "--", as shown by the following command line example:

APP value -size=100 --filename "Dir/Folder/File Name" --debug.

There is no distinction between "-" or "--". The "value" is a floating value. All other items are treated as key-value pairs. Above, the "debug" flag will be interpreted as the key-value pair: -debug=True.

Usage 1:

public static int Main(string[] args)
{
    // With array construction
    var parser = new KuiperZone.Utility.ArgumentParser(args);

    Console.WriteLine("VALUE: " + parser.Value);

    if (parser.GetOrDefault("v", false) || parser.GetOrDefault("version", false))
    {
        Console.WriteLine("1.0.0");
        return 0;
    }
}

Usage 2:

// With string construction
var parser = new KuiperZone.Utility.ArgumentParser("value -size=100 -filename \"Dir/Folder/File Name\" --debug");

// Indexer also available
Console.WriteLine(parser["filename"]);

Copyright (C) Andy Thomas, 2022. Website: https://kuiper.zone

Yaap is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Yaap is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Attribution

Yaap was originally based on MIT licensed work by Richard Lopes, although modifications have been substantial. No formal copyright notice found, but see: https://www.codeproject.com/Articles/3111/C-NET-Command-Line-Arguments-Parser

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 404 1/23/2023
1.0.1 354 11/9/2022
1.0.0 356 10/10/2022