-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
40 lines (33 loc) · 1.14 KB
/
Program.cs
File metadata and controls
40 lines (33 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using alma.debugify;
using CommandLine;
using Spectre.Console;
using System;
using System.Linq;
namespace alma.debugify
{
class Program
{
static void Main(string[] args)
{
var logger = new ConsoleLogger();
// Show hero section unless asking for help
if (args.Length == 0 || (!args.Contains("--help") && !args.Contains("-h") && !args.Contains("help")))
{
ShowHero();
}
Parser.Default.ParseArguments<DebugCommand, ListCommand, CleanupCommand>(args)
.WithParsed<DebugCommand>(c => new Debugifier(logger).Debugify(c))
.WithParsed<ListCommand>(c => new DebugifiedListProvider(logger).List(c))
.WithParsed<CleanupCommand>(c => new Undebugifier(logger).Cleanup(c));
}
static void ShowHero()
{
AnsiConsole.Write(
new FigletText("Debugify")
.LeftJustified()
.Color(Color.Cyan1));
AnsiConsole.MarkupLine("[dim]Debug your NuGet packages locally[/]");
AnsiConsole.WriteLine();
}
}
}