Dotnet_Executable/project_name/Program.cs
Simon Diesenreiter a6bae9dc80
All checks were successful
Rename the project from template / rename-project (push) Has been skipped
SonarQube Scan / SonarQube Trigger (push) Has been skipped
CI / linter (9.0.X, ubuntu-latest) (push) Successful in 51s
CI / tests_linux (9.0.X, ubuntu-latest) (push) Successful in 2m51s
bugfixes
2024-11-27 19:44:15 +01:00

35 lines
1020 B
C#

using CommandLine;
class Program
{
public class Options
{
[Option('v', "verbose", Required = false, HelpText = "Set output to verbose messages.")]
public bool Verbose { get; set; }
}
static void Main(string[] args)
{
Parser.Default.ParseArguments<Options>(args)
.WithParsed<Options>(o =>
{
if (o.Verbose)
{
Console.WriteLine($"Verbose output enabled. Current Arguments: -v {o.Verbose}");
Console.WriteLine("Quick Start Example! App is in Verbose mode!");
}
else
{
Console.WriteLine($"Current Arguments: -v {o.Verbose}");
Console.WriteLine("Quick Start Example!");
}
EntryPoint(o);
});
}
static void EntryPoint(Options o)
{
Console.WriteLine("Hello world!");
}
}