forked from ABouveron/keygen-licensing-csharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
38 lines (37 loc) · 1.33 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
namespace example_csharp_licensing_Docker;
public abstract class Program
{
public static async Task Main(string[]? args)
{
Env.Load();
if (args == null || args.Length == 0)
MachineFile.Verification(args);
else
switch (args[0])
{
case "testapi":
TestApi.MainApi(args[1..]);
return;
case "license":
await CheckInternet.CheckInternetLicense(args[1..]);
return;
case "api":
await CheckInternet.CheckInternetTest(args[1..]);
return;
case "timecheck":
await CheckInternet.CheckInternetPeriodic(args[1..]);
return;
case "fingerprint":
var serialNumber = SerialNumber.GetSerialNumber();
Debug.Assert(serialNumber != null, nameof(serialNumber) + " != null");
Console.WriteLine(SerialNumber.GetHash(serialNumber));
return;
case "serialnumber":
Console.WriteLine(SerialNumber.GetSerialNumber());
return;
default:
MachineFile.Verification(args);
break;
}
}
}