Skip to content

Exploring ways of using System.CommandLine to build CLI tools

Notifications You must be signed in to change notification settings

aimenux/SystemCommandLineDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Aymen TROUDIAymen TROUDI
Aymen TROUDI
and
Aymen TROUDI
Nov 23, 2021
a7fef0e · Nov 23, 2021

History

5 Commits
Nov 23, 2021
Nov 23, 2021
Nov 23, 2021
Nov 23, 2021
Nov 23, 2021
Nov 23, 2021
Nov 23, 2021

Repository files navigation

.NET

SystemCommandLineDemo

Exploring ways of using System.CommandLine to build CLI tools

In this repo, i m exploring various ways in order to build a simple cli tool based on System.CommandLine.

1️⃣ straightforward way

  • pros : simplicity
  • cons : verbosity

2️⃣ fluent way

  • pros : discoverability
  • cons : encapsulation

3️⃣ poco way

  • pros : encapsulation
  • cons : performance (use of reflection)

To run code in debug or release mode, type the following commands in your favorite terminal :

  • .\Way.exe Upper [InputText]
  • .\Way.exe Lower [InputText]

Tools : vs22, net 6.0, command-line

About

Exploring ways of using System.CommandLine to build CLI tools

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages