✅ Ready to clone and code.
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
c9a9b12831
commit
a49ea792cc
35
song_of_the_day/Program.cs
Normal file
35
song_of_the_day/Program.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
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!");
|
||||
}
|
||||
}
|
1
song_of_the_day/VERSION
Normal file
1
song_of_the_day/VERSION
Normal file
@@ -0,0 +1 @@
|
||||
0.1.0
|
15
song_of_the_day/song_of_the_day.csproj
Normal file
15
song_of_the_day/song_of_the_day.csproj
Normal file
@@ -0,0 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommandLineParser" Version="2.9.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Reference in New Issue
Block a user