diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..e304982
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,19 @@
+
+# This file is the top-most editor configuration file
+root = true
+
+# Default settings for all files
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 4
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+# Turns the maximum line length off for Markdown files, as we use the automatic word wrap of the code editor
+[*.md]
+max_line_length = off
+
+# C# project files use 2 spaces for indentation
+[*.csproj]
+indent_size = 2
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..5293555
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,62 @@
+
+# Normalize line endings for all text files to Unix-style (LF) on commit; Git auto-detects whether a file is text and, if so, stores it with LF in the
+# repository regardless of the line endings used in the working tree
+* text=auto eol=lf
+
+# Source and configuration files that should always be treated as text and normalized to LF
+*.cs text
+*.csproj text
+*.sln text eol=crlf
+*.props text
+*.targets text
+*.json text
+*.jsonc text
+*.md text
+*.yml text
+*.yaml text
+*.toml text
+*.xml text
+*.svg text
+*.txt text
+*.editorconfig text
+*.gitattributes text
+*.gitignore text
+Dockerfile text
+Containerfile text
+compose.yaml text
+
+# Shell scripts must always use LF, otherwise they break on Unix systems
+*.sh text eol=lf
+*.bash text eol=lf
+
+# Windows-only scripts must keep CRLF, otherwise they break on Windows
+*.bat text eol=crlf
+*.cmd text eol=crlf
+*.ps1 text eol=crlf
+
+# Binary files that must never be normalized or line-ending converted
+*.png binary
+*.jpg binary
+*.jpeg binary
+*.gif binary
+*.ico binary
+*.webp binary
+*.avif binary
+*.woff binary
+*.woff2 binary
+*.ttf binary
+*.eot binary
+*.otf binary
+*.pdf binary
+*.zip binary
+*.gz binary
+*.7z binary
+*.mp4 binary
+*.webm binary
+*.mov binary
+*.mp3 binary
+*.wav binary
+*.dll binary
+*.exe binary
+*.node binary
+*.snap binary -diff
diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml
new file mode 100644
index 0000000..3b57168
--- /dev/null
+++ b/.github/workflows/linters.yml
@@ -0,0 +1,58 @@
+# The display name of the workflow, shown in the "Actions" tab of the GitHub repository and in the checks of a commit or pull request
+name: Linters
+
+# Defines the events that trigger this workflow; this workflow runs on every push to any branch of the repository
+on:
+ push:
+
+# Defines the jobs that make up the workflow; all jobs run in parallel by default, but here every linter is a separate step of a single job, so that
+# they all share the same checked-out working tree and Node.js installation
+jobs:
+ # A single job that runs all linters and code formatters of the project on a virtual machine with the latest Ubuntu image, which is the fastest and
+ # cheapest of the available runners
+ lint:
+ name: Run Linters
+ runs-on: ubuntu-latest
+
+ # The sequence of tasks that are executed as part of the job; the steps run sequentially in the same runner and share the same file system
+ steps:
+ # Checks out the repository into the runner's working directory, so that the linters have access to the source code and their configuration
+ # files; the "actions/checkout" action is pinned to a major version to receive non-breaking updates automatically
+ - name: Checkout Repository
+ uses: actions/checkout@v7
+
+ # Installs Node.js, which is required to run the npm-based linters CSpell and MarkdownLint, as well as the dprint code formatter, which is
+ # distributed as an npm package; pins the Node.js version to the current long-term support release, so that the linters run in a stable and
+ # reproducible environment
+ - name: Set Up Node.js
+ uses: actions/setup-node@v6
+ with:
+ node-version: 24
+
+ # Installs the linters and the code formatter globally, so that they are available as commands in the subsequent steps; installing them in a
+ # dedicated step keeps the linter steps below focused on just running the tools
+ - name: Install Linters
+ run: npm install --global dprint@0.55.1 cspell@10.0.1 markdownlint-cli2@0.23.0
+
+ # Runs the dprint code formatter in check mode; "check" only verifies that all files are already formatted and exits with a non-zero status code
+ # if any file is not, but unlike "dprint fmt" it never modifies any file; dprint automatically discovers the "dprint.json" stub in the
+ # repository root, which extends the real configuration in "tests/linters", so no configuration path has to be passed explicitly, and the
+ # "**/*" glob makes dprint check the whole repository (relative to the working directory)
+ - name: Check Formatting (dprint)
+ run: dprint check "**/*"
+
+ # Runs the CSpell spell checker over every file in the repository; the "lint" command reports spelling mistakes and exits with a non-zero status
+ # code if any are found, the configuration path is passed explicitly, and "--no-progress" suppresses the per-file progress output to keep the
+ # log readable; the "if" ensures that the step runs (unless the workflow was cancelled), even if the previous linter reported an error and
+ # exited with a non-zero exit code, so that the job runs all linters instead of stopping at the first failure
+ - name: Spell Check (CSpell)
+ if: ${{ !cancelled() }}
+ run: cspell lint --config tests/linters/.cspell.json --no-progress "**/*"
+
+ # Runs the MarkdownLint linter over all Markdown files in the repository; the configuration path is passed explicitly via "--config", and the
+ # build output directories are excluded using markdownlint-cli2's "#"-prefixed negated globs (markdownlint-cli2 has no "--ignore" flag), so that
+ # only the project's own documentation is linted; the "if" ensures that the step runs (unless the workflow was cancelled), even if the previous
+ # linter reported an error and exited with a non-zero exit code, so that the job runs all linters instead of stopping at the first failure
+ - name: Lint Markdown (MarkdownLint)
+ if: ${{ !cancelled() }}
+ run: markdownlint-cli2 --config tests/linters/.markdownlint.yml "**/*.md" "#**/bin/**" "#**/obj/**"
diff --git a/.gitignore b/.gitignore
index f62d8bd..f49b6f7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,29 @@
-# Ignores the build outputs
+# Operating system thumbnail databases
+.DS_Store
+Thumbs.db
+
+# IDEs and code editors (Visual Studio Code settings, launch configuration, tasks, and extensions are excluded)
+.c9/
+.classpath
+.history/*
+.project
+.settings/
+.vscode/*
+!.vscode/extensions.json
+!.vscode/launch.json
+!.vscode/settings.json
+!.vscode/tasks.json
+*.launch
+*.sublime-workspace
+/.idea
+
+# Build output
bin/
obj/
+
+# To Do Lists
+TODO.md
+
+# Miscellaneous tool logs, outputs, and caches
+.VSCodeCounter/
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000..c1d11f1
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,25 @@
+{
+ // List of extensions which should be recommended for users of this workspace
+ "recommendations": [
+ // Language support for .gitignore files
+ "codezombiech.gitignore",
+
+ // Perform spell-checking of the documentation, code, and comments with support for warnings/errors in Visual Studio Code
+ "streetsidesoftware.code-spell-checker",
+
+ // Integrates MarkdownLint into the editor
+ "DavidAnson.vscode-markdownlint",
+
+ // Integrates the dprint code formatter into the editor
+ "dprint.dprint",
+
+ // Adds useful features for editing Markdown tables
+ "TakumiI.markdowntable",
+
+ // Highlights TODOs, FIXMEs, HACKs, DEBUGs, REVIEWs, and NOTEs inside of code files
+ "wayou.vscode-todo-highlight",
+
+ // Integrates many useful features for editing Markdown
+ "yzhang.markdown-all-in-one",
+ ],
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 7b68778..ace795b 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,18 +1,112 @@
-
{
+ // A vertical ruler in the code editor at 150 characters, this is a visual aide to help users keep the 150 character line limit file files that
+ // warrant a line limit
+ "editor.rulers": [150],
+
+ // Maps file names to file types; this is required when Visual Studio Code does not correctly auto-detect file types based on file extension
+ "files.associations": {
+ "**/.vscode/*.json": "jsonc",
+ "dprint.json": "jsonc",
+ "LICENSE": "plaintext",
+ },
+
+ // Excludes certain files from being displayed in the file explorer
"files.exclude": {
- "**/.git": true,
- "**/.svn": true,
- "**/.hg": true,
- "**/CVS": true,
+ ".VSCodeCounter": true,
"**/.DS_Store": true,
+ "**/.git": true,
"**/bin": true,
- "**/obj": true
+ "**/obj": true,
+ "**/Thumbs.db": true,
+ },
+
+ // Excludes certain files from being watched by the file watcher, this is required, because if the data directory is inside of the workspace, then
+ // Visual Studio Code will watch the entire directory, which can not only cause performance issues, but will also cause the file watcher to run
+ // out of file handles, which are limited by the operating system, that are necessary to watch the files
+ "files.watcherExclude": {
+ ".VSCodeCounter": true,
+ "**/.git/objects/**": true,
+ "**/.git/subtree-cache/**": true,
+ "**/bin": true,
+ "**/obj": true,
+ },
+
+ // Configures the nesting of files that belong together in the explorer (the nested files are not expanded by default); this configuration nests
+ // all Node.js-related configuration files under the "package.json" file, and all linter and code formatter configuration files under the
+ // ".editorconfig" file
+ "explorer.fileNesting.enabled": true,
+ "explorer.fileNesting.expand": false,
+ "explorer.fileNesting.patterns": {
+ ".editorconfig": ".gitattributes, .gitignore, dprint.json",
+ "README.md": "CHANGELOG.md, CONTRIBUTORS.md, LICENSE, TODO.md",
},
- "cSpell.words": [
- "Neumann",
- "Xunit",
- "paket",
- "vvvcccaaa"
- ]
+
+ // Specifies which Git branches are protected in this repository, Visual Studio will prevent users from committing to these branches (this only
+ // works for the commit feature that is built into Visual Studio Code and not in the terminal)
+ "git.branchProtection": [
+ "main",
+ "staging",
+ ],
+
+ // Specifies that Visual Studio Code should always open the merge editor when a file is opened that has conflicts, instead of the code editor
+ "git.mergeEditor": true,
+
+ // Allows users to force push to a remote Git repository, as we regularly make use of "git commit --amend" in this project
+ "git.allowForcePush": true,
+
+ // Tells Visual Studio Code to fetch all branches instead of only the current one when pulling from a remote repository and to prune references
+ // to remote objects that no longer exist
+ "git.fetchOnPull": true,
+ "git.pruneOnFetch": true,
+
+ // Specifies that Visual Studio Code should push tags and perform a rebase instead of a merge when synching with a remote repository
+ "git.followTagsWhenSync": true,
+ "git.rebaseWhenSync": true,
+
+ // Imports the external settings for the code spell checker CSPell, furthermore, the "ignorePaths" and the "useGitignore" settings are reset,
+ // because they overwrite the settings in the imported configuration, also the diagnostic level is increased from "Information" to "Error" to
+ // indicate that spelling mistakes must be corrected
+ "cSpell.ignorePaths": [],
+ "cSpell.useGitignore": false,
+ "cSpell.diagnosticLevel": "Error",
+ "cSpell.import": ["${workspaceFolder}/tests/linters/.cspell.json"],
+
+ // Configures the Markdown linter MarkdownLint to use our custom configuration
+ "markdownlint.config": { "extends": "${workspaceFolder}/tests/linters/.markdownlint.yml" },
+
+ // Configures the code formatter dprint
+ "dprint.verbose": true,
+ "editor.defaultFormatter": "dprint.dprint",
+ "editor.formatOnType": false,
+ "editor.formatOnSave": true,
+
+ // A list of domains from which JSON schema files are automatically downloaded
+ "json.schemaDownload.trustedDomains": {
+ "https://developer.microsoft.com/json-schemas/": true,
+ "https://json-schema.org/": true,
+ "https://json.schemastore.org/": true,
+ "https://plugins.dprint.dev/": true,
+ "https://raw.githubusercontent.com/devcontainers/spec/": true,
+ "https://raw.githubusercontent.com/microsoft/vscode/": true,
+ "https://schemastore.azurewebsites.net/": true,
+ "https://www.schemastore.org/": true,
+ },
+
+ // Configures the icon theme to be VSCode Icons and adapts the icons of certain files and directories for the VSCode Icons plugin
+ "workbench.iconTheme": "vscode-icons",
+ "vsicons.associations.files": [
+ { "icon": "dal", "extensions": ["CHANGELOG.md"], "filename": true, "format": "svg" },
+ { "icon": "docz", "extensions": ["README.md"], "filename": true, "format": "svg" },
+ { "icon": "janet", "extensions": ["CONTRIBUTORS.md"], "filename": true, "format": "svg" },
+ { "icon": "todo", "extensions": ["TODO.md"], "filename": true, "format": "svg" },
+ { "icon": "vscode", "extensions": [".vscode/extensions.json", ".vscode/settings.json"], "filename": true, "format": "svg" },
+ ],
+ "vsicons.associations.folders": [
+ { "icon": "app", "extensions": ["sample-app"], "format": "svg" },
+ { "icon": "cli", "extensions": ["clinet-core"], "format": "svg" },
+ { "icon": "coverage", "extensions": ["linters"], "format": "svg" },
+ { "icon": "github", "extensions": ["workflows"], "format": "svg" },
+ { "icon": "template", "extensions": ["design"], "format": "svg" },
+ { "icon": "test", "extensions": ["unit-tests"], "format": "svg" },
+ ],
}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
deleted file mode 100644
index ec84cf9..0000000
--- a/.vscode/tasks.json
+++ /dev/null
@@ -1,31 +0,0 @@
-
-{
- "version": "2.0.0",
- "command": "dotnet",
- "type": "shell",
- "args": [],
- "tasks": [
- {
- "label": "build",
- "args": [
- "${workspaceRoot}/CommandLineParser.sln"
- ],
- "group": "build",
- "problemMatcher": "$msCompile"
- },
- {
- "label": "test",
- "args": [
- "${workspaceRoot}/test/System.CommandLine.Parser.Tests.csproj"
- ],
- "group": "test",
- "problemMatcher": "$msCompile",
- "presentation": {
- "echo": true,
- "reveal": "always",
- "focus": false,
- "panel": "shared"
- }
- }
- ]
-}
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..0d2440b
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,34 @@
+# Changelog
+
+## v0.3.0
+
+*To be determined.*
+
+Complete rewrite as a .NET 10 library using the modern application hosting model and an API that mirrors ASP.NET Core.
+
+In addition to the rewrite, the following changes were made:
+
+- Since the permissive MIT license has recently been used more and more by large corporations to take from the open source community and not give anything back, the license of this project was changed from MIT to LGPL 3.0. The LGPL still allows people to freely use the library in their own software, even for commercial projects, but making any changes to it forces the derivative work to be released under the same license, thus forcing companies to give back to the community.
+- The project now uses a set of linters and a code formatter to (1) find and correct problems in the code and (2) to consistently format all files. If you use Visual Studio Code to work on the project, all linters and the code formatter are configured to directly work in the code editor. A set of recommended extensions is included for the linters and the code formatter. The following tools are being used:
+ - **CSpell**, a spell checker for code, to ensure that there are no misspellings in the code.
+ - **MarkdownLint**, a linter for Markdown files, which ensures that the Markdown files are consistently formatted and standards are enforced.
+ - **dprint**, an unopinionated, configurable code formatter with plugins for many languages. This code formatter is used to format Markdown, JSON, XML, YAML, and TOML files in the project.
+- A completely new, modern logo was designed, which heavily borrows from the ASP.NET Core logo, with the "C" wordmark and a dot. The logo is available in both light and dark mode variants in the `design/` directory and a design guide for it was created.
+
+## v0.2.0
+
+*Never released.*
+
+Complete rewrite as a .NET Core .NET Standard library with cross-platform support. Was never released and skipped.
+
+## v0.1.1
+
+*Released on July 1, 2016.*
+
+Improved the error handling of the command line parser. Lexical and syntactical errors can now be handled.
+
+## v0.1.0
+
+*Released on June 15, 2016.*
+
+The initial release of the command line parser.
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
new file mode 100644
index 0000000..6039bcf
--- /dev/null
+++ b/CONTRIBUTORS.md
@@ -0,0 +1,5 @@
+# CLI.NET Core Contributors
+
+This is a list of all people who have contributed to the CLI.NET Core project in alphabetical order. If you have made any contributions to this project, please add yourself to the list.
+
+- [David Neumann](https://github.com/lecode-official)
diff --git a/CommandLineParser.sln b/CommandLineParser.sln
deleted file mode 100755
index 7d33d01..0000000
--- a/CommandLineParser.sln
+++ /dev/null
@@ -1,56 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26124.0
-MinimumVisualStudioVersion = 15.0.26124.0
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "source", "source", "{23B68DFF-3D21-42B9-8E37-FB5D6B51FE11}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.CommandLine.Parser", "source\System.CommandLine.Parser.csproj", "{2FF67E01-D4AD-4378-8D99-58A39CE98587}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{27E652C6-5165-4804-AE19-7D6C777B7C75}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.CommandLine.Parser.Tests", "test\System.CommandLine.Parser.Tests.csproj", "{32A32DAC-A488-4915-B103-B8CDC4243E91}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {2FF67E01-D4AD-4378-8D99-58A39CE98587}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2FF67E01-D4AD-4378-8D99-58A39CE98587}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2FF67E01-D4AD-4378-8D99-58A39CE98587}.Debug|x64.ActiveCfg = Debug|x64
- {2FF67E01-D4AD-4378-8D99-58A39CE98587}.Debug|x64.Build.0 = Debug|x64
- {2FF67E01-D4AD-4378-8D99-58A39CE98587}.Debug|x86.ActiveCfg = Debug|x86
- {2FF67E01-D4AD-4378-8D99-58A39CE98587}.Debug|x86.Build.0 = Debug|x86
- {2FF67E01-D4AD-4378-8D99-58A39CE98587}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2FF67E01-D4AD-4378-8D99-58A39CE98587}.Release|Any CPU.Build.0 = Release|Any CPU
- {2FF67E01-D4AD-4378-8D99-58A39CE98587}.Release|x64.ActiveCfg = Release|x64
- {2FF67E01-D4AD-4378-8D99-58A39CE98587}.Release|x64.Build.0 = Release|x64
- {2FF67E01-D4AD-4378-8D99-58A39CE98587}.Release|x86.ActiveCfg = Release|x86
- {2FF67E01-D4AD-4378-8D99-58A39CE98587}.Release|x86.Build.0 = Release|x86
- {32A32DAC-A488-4915-B103-B8CDC4243E91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {32A32DAC-A488-4915-B103-B8CDC4243E91}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {32A32DAC-A488-4915-B103-B8CDC4243E91}.Debug|x64.ActiveCfg = Debug|x64
- {32A32DAC-A488-4915-B103-B8CDC4243E91}.Debug|x64.Build.0 = Debug|x64
- {32A32DAC-A488-4915-B103-B8CDC4243E91}.Debug|x86.ActiveCfg = Debug|x86
- {32A32DAC-A488-4915-B103-B8CDC4243E91}.Debug|x86.Build.0 = Debug|x86
- {32A32DAC-A488-4915-B103-B8CDC4243E91}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {32A32DAC-A488-4915-B103-B8CDC4243E91}.Release|Any CPU.Build.0 = Release|Any CPU
- {32A32DAC-A488-4915-B103-B8CDC4243E91}.Release|x64.ActiveCfg = Release|x64
- {32A32DAC-A488-4915-B103-B8CDC4243E91}.Release|x64.Build.0 = Release|x64
- {32A32DAC-A488-4915-B103-B8CDC4243E91}.Release|x86.ActiveCfg = Release|x86
- {32A32DAC-A488-4915-B103-B8CDC4243E91}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {2FF67E01-D4AD-4378-8D99-58A39CE98587} = {23B68DFF-3D21-42B9-8E37-FB5D6B51FE11}
- {32A32DAC-A488-4915-B103-B8CDC4243E91} = {27E652C6-5165-4804-AE19-7D6C777B7C75}
- EndGlobalSection
-EndGlobal
diff --git a/LICENSE b/LICENSE
index a5ae042..0a04128 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,21 +1,165 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 David Neumann
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/README.md b/README.md
index 91c75eb..8e789dc 100644
--- a/README.md
+++ b/README.md
@@ -1,36 +1,32 @@
-# Command Line Parser
+# CLI.NET Core
-
+ 
-A simple and light-weight parser for command line arguments, which makes it possible to access parameters
-from the command line via well-defined .NET data structures.
+CLI.NET Core is a command line application framework in the style of ASP.NET Core. It allows you to define commands and command line arguments in much the same way you would define actions and arguments for a Web API in ASP.NET Core.
-## Using the Project
+## Project Structure
-You can always get the latest stable version from NuGet:
+The repository is organized into a few top-level directories:
-```bash
-Install-Package System.CommandLine.Parser -Version 0.1.1 # Using the Visual Studio Package Manager
-dotnet add package System.CommandLine.Parser --version 0.1.1 # Using the .NET Command Line Interface
-paket add System.CommandLine.Parser --version 0.1.1 # Using the packet Command Line Interface
-```
+- **`source/`** — The source code of the CLI.NET Core framework itself.
+- **`tests/`** — The unit tests and integration tests that verify the behavior of the framework, as well as the linters and code formatters that enforce a consistent and high-quality codebase.
+- **`docs/`** — The project documentation. Start with [`docs/README.md`](docs/README.md).
+- **`design/`** — Design assets related to the project and the [design guide](design/DESIGN.md).
-**__But please be aware that the current 0.1.1 version on NuGet is outdated and should only be used for
-legacy projects. The next release is a complete rewrite of the original code for .NET Core and will work
-on all supported .NET Core platforms (e.g. Windows, macOS, and Linux).__**
+## Development
-If you want to go ahead and use the new version, you can download and manually build the solution. The
-project was built using Visual Studio Code and .NET Core 2.0. To build the solution, clone the repository
-and build it using the command line tools of .NET Core:
+### Code Formatting & Linting
-```bash
-git clone https://github.com/lecode-official/command-line-parser
-cd command-line-parser
-dotnet build
-dotnet test ./test/System.CommandLine.Parser.Tests/System.CommandLine.Parser.Tests.csproj
-```
+The project uses a set of linters and a code formatter to (1) find and correct problems in the code and (2) to consistently format all files. If you use Visual Studio Code to work on the project, all linters and the code formatter are configured to directly work in the code editor. A set of recommended extensions is included for the linters and the code formatter. The following tools are being used:
-## Contributions
+- **[CSpell](tests/linters/.cspell.json)**, a spell checker for code, to ensure that there are no misspellings in the code.
+- **[MarkdownLint](tests/linters/.markdownlint.yml)**, a linter for Markdown files, which ensures that the Markdown files are consistently formatted and standards are enforced.
+- **[dprint](dprint.json)**, an unopinionated, configurable code formatter with plugins for many languages. This code formatter is used to format Markdown, JSON, XML, YAML, and TOML files in the project.
-I always greatly appreciate feedback and bug reports. To file a bug, please use GitHub's issue system.
-Alternatively, you can clone the repository and send me a pull request.
+## Contributing
+
+If you'd like to contribute, there are multiple ways you can help out. If you find a bug or have a feature request, please feel free to open an issue on GitHub. If you want to contribute code, please fork the repository and use a feature branch. Pull requests are always welcome. Before forking, please open an issue where you describe what you want to do. This helps to align your ideas with mine and may prevent you from doing work, that I am already planning on doing. If you have contributed to the project, please add yourself to the [contributors list](CONTRIBUTORS.md) and document your changes in the [changelog](CHANGELOG.md). Also, if necessary, update the [documentation](docs/README.md). To help speed up the merging of your pull request, please comment and document your code extensively and try to emulate the coding style of the project.
+
+## License
+
+The code in this project is licensed under the GNU Lesser General Public License v3.0 license. This generally means that you may use, distribute, and modify this work freely given that you make the complete source code of your modifications available under the same license. If your project uses this software only through the provided interfaces (i.e., you link against this library), your work may be distributed under different terms without having to publish the source code of your work, even if your project is closed source and commercial. If you make contributions you explicitly grant patent rights if your contribution includes anything patented by you. **This is no legal advice and you should read the [license file](LICENSE) for more information.**
diff --git a/design/DESIGN.md b/design/DESIGN.md
new file mode 100644
index 0000000..0c41dc7
--- /dev/null
+++ b/design/DESIGN.md
@@ -0,0 +1,89 @@
+# CLI.NET Core — Brand & Logo Guide
+
+This document describes the CLI.NET Core visual identity and how to use the logo assets in this repository. All assets live in this folder.
+
+## Concept
+
+The mark is an **aperture "C"** cradling a **dot**.
+
+- The **C** stands for CLI, Core, and C#.
+- The **dot** is the `.` of `.NET` — the pivot the whole ecosystem turns around.
+- The opening of the C reads as an *intake*: arguments going in, structure coming out. It nods to the way ASP.NET Core routes a request to a handler — the same API feel CLI.NET Core mirrors for the command line.
+
+The style is **restrained and terminal-native**: near-black and a single violet accent, geometric construction, no literal terminal window or blinking prompt.
+
+## Color
+
+| Token | Hex | Use |
+| --------------- | --------------------- | --------------------------------------- |
+| Ink | `#23222B` | Primary text, mark on light |
+| Ink (mark) | `#4E4672` | The "C" on light glass badges |
+| Accent (violet) | `#6D4AFF` | The dot, the `.` in the wordmark, links |
+| Accent (light) | `#A98CFF` / `#8B6BFF` | Dot / accent on dark surfaces |
+| Paper | `#F3F2F5` | Mark on dark, light surfaces |
+| Near-black | `#16151C` | Dark surfaces, terminal chrome |
+
+**Dark badge field** (radial, light→dark): `#4A3D82 → #2C2650 → #1C1930` **Light badge field** (linear): `#EFEAFF → #E6DBFF → #F4ECFB`
+
+The violet accent is the only saturated color. Use it sparingly — one accent per composition.
+
+## Typography
+
+**Space Grotesk** — wordmark and headings. The wordmark is weight **600** with `CLI` / `NET` in ink, the `.` in accent violet, and `Core` in weight **400**, slightly muted.
+
+Wordmark spelling is always **`CLI.NET Core`** — the dot is colored, `Core` is a separate lighter word.
+
+## The Mark
+
+- Outer circle radius **39**, inner radius **21**, centered in a 100×100 box.
+- Mouth opening on the right, spanning **±34°**.
+- The four mouth terminals are filleted with an **equal corner radius of 3** (mathematically tangent to the arcs — no visible kink).
+- The dot sits at **(73, 50)** with radius **8**, in the accent violet.
+
+Do not re-draw the mark by hand; use the vector files below.
+
+## Variants & Files
+
+### Core Vector Marks
+
+- `mark-light.svg` — ink mark + violet dot, for light backgrounds
+- `mark-dark.svg` — paper mark + light-violet dot, for dark backgrounds
+
+### App/Package Badges
+
+- `badge-glass-light.svg` / `-dark.svg` — the **primary** frosted-glass badge (drop shadow on the inner panel, inner glow, gentle gradient dither).
+- `badge-flat-light.svg` / `-dark.svg` — flat, full-bleed badges. Use for small favicons and anywhere filter effects may be stripped.
+
+### Wordmark Lockups
+
+- `wordmark-light.svg` / `-dark.svg` — compact bar (mark + text).
+- `readme-light.svg` / `-dark.svg` — tall horizontal lockup for READMEs.
+- `wordmark-bars.html` — responsive, fill-width HTML version of the bar (`.clinet-core-bar`, add `.clinet-core-bar--dark` on dark surfaces).
+
+## Using the Logo on GitHub
+
+GitHub sanitizes SVG `` effects when rendered via ``, so use the **baked PNGs** for the glass look, and let GitHub pick light/dark:
+
+```markdown
+ 
+```
+
+## Dos/Don'ts
+
+**Dos:**
+
+- Keep clear space around the mark equal to the dot's diameter.
+- Pair the light mark with light surfaces, the dark mark with dark surfaces.
+- Use the flat badge when effects might not render (tiny sizes, sanitized SVG).
+
+**Don'ts:**
+
+- Recolor the mark outside the palette, or add a second accent.
+- Stretch or skew the mark or wordmark.
+- Add a literal terminal window, cursor, or prompt.
+- Rasterize the glass SVG very large — an 8-bit gradient will band; prefer the vector master or a super-sampled PNG.
+
+## Notes on Formats
+
+- **SVG** is the source of truth (resolution-independent). The glass badges use only widely-supported filter primitives (`feGaussianBlur`, `feOffset`, `feComposite`, `feFlood`, `feTurbulence`) — they open correctly in Inkscape.
+- The SVG wordmarks reference the **Space Grotesk** font; install it or request an outlined version if you need them fully self-contained.
diff --git a/design/badge-flat-dark.svg b/design/badge-flat-dark.svg
new file mode 100644
index 0000000..8029f68
--- /dev/null
+++ b/design/badge-flat-dark.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/design/badge-flat-light.svg b/design/badge-flat-light.svg
new file mode 100644
index 0000000..a8e79c4
--- /dev/null
+++ b/design/badge-flat-light.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/design/badge-glass-dark.svg b/design/badge-glass-dark.svg
new file mode 100644
index 0000000..ce1a218
--- /dev/null
+++ b/design/badge-glass-dark.svg
@@ -0,0 +1,28 @@
+
\ No newline at end of file
diff --git a/design/badge-glass-light.svg b/design/badge-glass-light.svg
new file mode 100644
index 0000000..7dac1fc
--- /dev/null
+++ b/design/badge-glass-light.svg
@@ -0,0 +1,28 @@
+
\ No newline at end of file
diff --git a/design/mark-dark.svg b/design/mark-dark.svg
new file mode 100644
index 0000000..fd20084
--- /dev/null
+++ b/design/mark-dark.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/design/mark-light.svg b/design/mark-light.svg
new file mode 100644
index 0000000..6a4bfcb
--- /dev/null
+++ b/design/mark-light.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/design/mini-badge-flat-dark.svg b/design/mini-badge-flat-dark.svg
new file mode 100644
index 0000000..af4dede
--- /dev/null
+++ b/design/mini-badge-flat-dark.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/design/mini-badge-flat-light.svg b/design/mini-badge-flat-light.svg
new file mode 100644
index 0000000..6419c4d
--- /dev/null
+++ b/design/mini-badge-flat-light.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/design/readme-header-dark.png b/design/readme-header-dark.png
new file mode 100644
index 0000000..a7b7583
Binary files /dev/null and b/design/readme-header-dark.png differ
diff --git a/design/readme-header-dark.svg b/design/readme-header-dark.svg
new file mode 100644
index 0000000..8cf6a6b
--- /dev/null
+++ b/design/readme-header-dark.svg
@@ -0,0 +1,32 @@
+
diff --git a/design/readme-header-light.png b/design/readme-header-light.png
new file mode 100644
index 0000000..42854c9
Binary files /dev/null and b/design/readme-header-light.png differ
diff --git a/design/readme-header-light.svg b/design/readme-header-light.svg
new file mode 100644
index 0000000..aa91f9d
--- /dev/null
+++ b/design/readme-header-light.svg
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+CLI.NET Core
+
\ No newline at end of file
diff --git a/design/wordmark-dark.svg b/design/wordmark-dark.svg
new file mode 100644
index 0000000..1ebf4b0
--- /dev/null
+++ b/design/wordmark-dark.svg
@@ -0,0 +1,2 @@
+
+CLI.NET Core
\ No newline at end of file
diff --git a/design/wordmark-light.svg b/design/wordmark-light.svg
new file mode 100644
index 0000000..4bc97a3
--- /dev/null
+++ b/design/wordmark-light.svg
@@ -0,0 +1,2 @@
+
+CLI.NET Core
\ No newline at end of file
diff --git a/design/wordmark.html b/design/wordmark.html
new file mode 100644
index 0000000..6df6e07
--- /dev/null
+++ b/design/wordmark.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+ CLI.NET Core — wordmark bar
+
+
+
+
+
+
+
Fill-width bar — resize the window; the box grows, content stays put
+
+
+
+
+
+
+ CLI.NET Core
+
+
+
+
+
+
+
+ CLI.NET Core
+
+
+
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 0000000..57fa1de
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,3 @@
+# Documentation
+
+Welcome to the documentation of CLI.NET Core, a .NET command line application framework in the style of ASP.NET Core. It allows you to define commands and command line arguments in much the same way you would define actions and arguments for a Web API in ASP.NET Core.
diff --git a/docs/images/Banner.png b/docs/images/Banner.png
deleted file mode 100644
index af3a778..0000000
Binary files a/docs/images/Banner.png and /dev/null differ
diff --git a/docs/images/Logo.fw.png b/docs/images/Logo.fw.png
deleted file mode 100644
index 7e94c9d..0000000
Binary files a/docs/images/Logo.fw.png and /dev/null differ
diff --git a/docs/images/Logo.ico b/docs/images/Logo.ico
deleted file mode 100644
index feaab61..0000000
Binary files a/docs/images/Logo.ico and /dev/null differ
diff --git a/docs/images/Logo1024x1024.png b/docs/images/Logo1024x1024.png
deleted file mode 100644
index fbabed5..0000000
Binary files a/docs/images/Logo1024x1024.png and /dev/null differ
diff --git a/docs/images/Logo128x128.png b/docs/images/Logo128x128.png
deleted file mode 100644
index c897295..0000000
Binary files a/docs/images/Logo128x128.png and /dev/null differ
diff --git a/docs/images/Logo256x256.png b/docs/images/Logo256x256.png
deleted file mode 100644
index e3f5b33..0000000
Binary files a/docs/images/Logo256x256.png and /dev/null differ
diff --git a/docs/images/Logo32x32.png b/docs/images/Logo32x32.png
deleted file mode 100644
index 59a6221..0000000
Binary files a/docs/images/Logo32x32.png and /dev/null differ
diff --git a/docs/images/Logo512x512.png b/docs/images/Logo512x512.png
deleted file mode 100644
index b77c809..0000000
Binary files a/docs/images/Logo512x512.png and /dev/null differ
diff --git a/docs/images/Logo64x64.png b/docs/images/Logo64x64.png
deleted file mode 100644
index 1e6fe26..0000000
Binary files a/docs/images/Logo64x64.png and /dev/null differ
diff --git a/dprint.json b/dprint.json
new file mode 100644
index 0000000..cf5d9a5
--- /dev/null
+++ b/dprint.json
@@ -0,0 +1,82 @@
+{
+ // By default, dprint only formats files that have changed since the last time it was run; setting "incremental" to false forces dprint to always
+ // format all eligible files; unlike most settings, "incremental" is a global setting that cannot be inherited through "extends" (dprint reports
+ // it as an unknown property when it appears in an extended configuration), so it has to be declared here in the top-level configuration instead
+ // of in the extended configuration in "tests/linters"
+ "incremental": false,
+
+ // By default, everything should be indented with 4 space characters and no tabs should be used (exceptions are configured accordingly)
+ "indentWidth": 4,
+ "useTabs": false,
+
+ // No language should ever exceed 150 characters per line (although dprint may sometimes fail to break lines to fullfil this limit); some
+ // languages, like Markdown have separate settings to disable line breaking, so the character limit does not apply to them
+ "lineWidth": 150,
+
+ // Configuration for Markdown files
+ "markdown": {
+ "textWrap": "never",
+ "emphasisKind": "asterisks",
+ },
+
+ // Configuration for JSON files
+ "json": {
+ // The JSON standard does not allow trailing commas, but the JSONC standard does, so we force trailing commas only for JSONC
+ "trailingCommas": "jsonc",
+ "jsonTrailingCommaFiles": [
+ ".cspell.json",
+ ".vscode/extensions.json",
+ ".vscode/settings.json",
+ ".vscode/tasks.json",
+ "dprint.json",
+ ],
+ },
+
+ // Configuration for XML files
+ "markup": {
+ "formatComments": true,
+ "preferAttrsSingleLine": true,
+
+ // C# project files (.csproj) and the XML-based solution files (.slnx) are XML, but they do not use a file extension that the markup_fmt
+ // plugin recognizes by default, so they are explicitly associated with the plugin here; associations are additive, so the plugin keeps
+ // formatting the file types it already recognizes on its own (e.g. .xml and .html)
+ "associations": [
+ "**/*.csproj",
+ "**/*.slnx",
+ ],
+
+ // The closing angle bracket is on the same line as the last attribute when an HTML tag is broken over multiple lines
+ "closingBracketSameLine": true,
+ },
+
+ // Configuration for YAML files
+ "yaml": {
+ "indentWidth": 2,
+ "trimTrailingZero": true,
+
+ // Forces a whitespace at the beginning of a comment
+ "formatComments": true,
+
+ // Wraps prose text in plain scalars when they exceed the print width
+ "proseWrap": "always",
+ },
+
+ // Configuration for TOML files
+ "toml": {
+ "indentWidth": 2,
+ },
+
+ // Glob patterns for files that should be excluded
+ "excludes": [
+ "**/*.svg",
+ ],
+
+ // A list of plugins that should be used by dprint
+ "plugins": [
+ "https://plugins.dprint.dev/g-plane/markup_fmt-v0.27.3.wasm",
+ "https://plugins.dprint.dev/g-plane/pretty_yaml-v0.6.0.wasm",
+ "https://plugins.dprint.dev/json-0.22.0.wasm",
+ "https://plugins.dprint.dev/markdown-0.22.1.wasm",
+ "https://plugins.dprint.dev/toml-0.7.0.wasm",
+ ],
+}
diff --git a/source/Arguments/Argument.cs b/source/Arguments/Argument.cs
deleted file mode 100644
index 051bba4..0000000
--- a/source/Arguments/Argument.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-
-namespace System.CommandLine.Arguments
-{
- ///
- /// Represents the abstract base class that all argument types have to implement.
- ///
- public abstract class Argument
- {
- #region Properties
-
- ///
- /// Gets the name of the argument.
- ///
- public string Name { get; protected set; }
-
- ///
- /// Gets the alias name of the argument.
- ///
- public string Alias { get; protected set; }
-
- ///
- /// Contains the name that the argument will have in the result dictionary after parsing. This must adhere to normal C# naming standards.
- ///
- private string destination;
-
- ///
- /// Gets the name that the argument will have in the result dictionary after parsing. This should adhere to normal C# naming standards. If it does not, it is automatically converted.
- ///
- public string Destination
- {
- get => this.destination;
- protected set => this.destination = value.ToCamelCasePropertyName();
- }
-
- ///
- /// Gets the descriptive help text for the argument, which is used in the help string.
- ///
- public string Help { get; protected set; }
-
- ///
- /// Gets the type of the argument.
- ///
- public Type Type { get; protected set; }
-
- #endregion
- }
-}
diff --git a/source/Arguments/FlagArgument.cs b/source/Arguments/FlagArgument.cs
deleted file mode 100644
index 4aa85d0..0000000
--- a/source/Arguments/FlagArgument.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-
-#region Using Directives
-
-using System.Collections.Generic;
-using System.Reflection;
-
-#endregion
-
-namespace System.CommandLine.Arguments
-{
- ///
- /// Represents a single flag argument of a command line parser. In contrast to named arguments, flag arguments, cannot be explicitly assigned a value, but rather get their value from their presence or absence.
- ///
- ///
- /// The type of the argument. May only be a boolean, integer, or enumeration type. When the type is boolean, then only the presence or absence of the flag is determined. If the type is an integer type (i.e. byte, sbyte,
- /// short, ushort, int, uint, long, or ulong), then the number of occurrences is determined. But if the type is an enumeration type, then the number of occurrences is interpreted as the enumeration value. For example
- /// consider the following enumeration type: enum Severity { None = 0, Low = 1, Medium = 2, High = 3 }, which is the type of the flag argument named "severity" with the alias "s", then the following command line
- /// argument "-sss" would parse to an enumeration value of Severity.High.
- ///
- public class FlagArgument : Argument
- {
- #region Constructors
-
- ///
- /// Initializes a new instance.
- ///
- /// The name of the argument, which is used for parsing and in the help string.
- /// The alias name of the argument.
- /// The name that the argument will have in the result dictionary after parsing. This should adhere to normal C# naming standards. If it does not, it is automatically converted.
- /// A descriptive help text for the argument, which is used in the help string.
- /// If either the name or the destination are null, empty, or only consist of white spaces, then an is thrown.
- public FlagArgument(string name, string alias, string destination, string help)
- {
- // Validates the arguments
- if (string.IsNullOrWhiteSpace(name))
- throw new ArgumentNullException(nameof(name));
- if (string.IsNullOrWhiteSpace(destination))
- throw new ArgumentNullException(nameof(destination));
-
- // Stores the arguments for later use
- this.Name = name;
- this.Alias = alias;
- this.Destination = destination;
- this.Help = help;
- this.Type = typeof(T);
-
- // Checks if the type of the flag argument is allowed
- if (!FlagArgument.allowedTypes.Contains(this.Type) && !this.Type.GetTypeInfo().IsEnum)
- throw new ArgumentException("The specified type is not allowed for flag arguments.", nameof(T));
- }
-
- #endregion
-
- #region Private Static Fields
-
- ///
- /// Contains a list of all the types that are allowed to be used with .
- ///
- private static List allowedTypes = new List { typeof(bool), typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint), typeof(long), typeof(ulong) };
-
- #endregion
- }
-}
diff --git a/source/Arguments/NamedArgument.cs b/source/Arguments/NamedArgument.cs
deleted file mode 100644
index 0d8c9e1..0000000
--- a/source/Arguments/NamedArgument.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-
-#region Using Directives
-
-using System.CommandLine.ValueConverters;
-using System.Reflection;
-
-#endregion
-
-namespace System.CommandLine.Arguments
-{
- ///
- /// Represents a single named argument of a command line parser. A named argument is a command line argument that is comprised of a name and an explicit value.
- ///
- /// The type of the argument.
- public class NamedArgument : Argument
- {
- #region Constructors
-
- ///
- /// Initializes a new instance.
- ///
- /// The name of the argument, which is used for parsing and in the help string.
- /// The alias name of the argument.
- /// The name that the argument will have in the result dictionary after parsing. This should adhere to normal C# naming standards. If it does not, it is automatically converted.
- /// A descriptive help text for the argument, which is used in the help string.
- /// The value that the argument receives if it was not detected by the parser.
- /// A callback function, which is invoked when the same argument was specified more than once.
- /// If either the name or the destination are null, empty, or only consist of white spaces, then an is thrown.
- public NamedArgument(string name, string alias, string destination, string help, T defaultValue, Func duplicateResolutionPolicy)
- {
- // Validates the arguments
- if (string.IsNullOrWhiteSpace(name))
- throw new ArgumentNullException(nameof(name));
- if (string.IsNullOrWhiteSpace(destination))
- throw new ArgumentNullException(nameof(destination));
-
- // Stores the arguments for later use
- this.Name = name;
- this.Alias = alias;
- this.Destination = destination;
- this.Help = help;
- this.DefaultValue = defaultValue;
- this.DuplicateResolutionPolicy = duplicateResolutionPolicy != null ? new Func