-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
46 lines (41 loc) · 1.21 KB
/
Program.cs
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
41
42
43
44
45
46
using cli.Authentication;
namespace cli;
class Program
{
static async Task Main(string[] args)
{
if (args == null || args.Length == 0)
{
Console.WriteLine("Please provide an argument: 'AppInstallationToken', 'PersonalAccessToken', or 'Sandbox'");
return;
}
var approach = "default";
if (args.Length > 1)
{
if (args[1] == "builder" || args[1] == "default")
{
approach = args[1];
}
else
{
Console.WriteLine("Invalid argument. Please provide 'builder' or 'default'");
return;
}
}
switch (args[0])
{
case "AppInstallationToken":
await AppInstallationToken.Run(approach);
break;
case "PersonalAccessToken":
await PersonalAccessToken.Run(approach);
break;
case "Sandbox":
await Example.Run();
break;
default:
Console.WriteLine("Invalid argument. Please provide 'AppInstallationToken' or 'PersonalAccessToken'");
break;
}
}
}