blob: 85dfbb0bb9b49aa2bbd3db030955559a8c4dba13 (
plain)
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
47
48
|
using CommandLine;
using ConsoleTables;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Tango.BL;
using Tango.DataStore.Web;
using Tango.Web;
namespace Tango.DataStore.CLI
{
class Program
{
static void Main(string[] args)
{
var console = new DataStoreConsole();
var result = Parser.Default.ParseArguments<GetOptions, PutOptions, LoginConfig>(args)
.WithParsed<GetOptions>((options) =>
{
console.Get(options);
})
.WithParsed<PutOptions>((options) =>
{
console.Put(options);
})
.WithParsed<LoginConfig>((options) =>
{
console.AutoLogin(options);
})
.WithNotParsed((errors) =>
{
});
if (Debugger.IsAttached)
{
Console.WriteLine();
Console.WriteLine("Press return to exit...");
Console.ReadLine();
}
}
}
}
|