From 0ee81ef847af3702b3b37f94cc62e835f9294e55 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Mon, 16 Nov 2020 14:35:19 +0200 Subject: Working on DataStore WebAPI & CLI. --- .../DataStore/Tango.DataStore.CLI/Program.cs | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs (limited to 'Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs') diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs new file mode 100644 index 000000000..e27f76c79 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs @@ -0,0 +1,49 @@ +using CommandLine; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; + +namespace Tango.DataStore.CLI +{ + class Program + { + static void Main(string[] args) + { + var result = Parser.Default.ParseArguments(args) + .WithParsed((options) => + { + Console.WriteLine($"{options.Email}, {options.Password}"); + }) + .WithParsed((options) => + { + Console.WriteLine($"{options.Email}, {options.Password}"); + }) + .WithNotParsed((errors) => + { + + }); + + Console.ReadLine(); + } + + private static int DisplayHelp(ParserResult result, IEnumerable errs) + { + var helpText = CommandLine.Text.HelpText.AutoBuild(result, h => + { + h.AdditionalNewLineAfterOption = false; + h.AddNewLineBetweenHelpSections = true; + h.AddEnumValuesToHelpText = true; + h.AutoVersion = false; + h.Heading = CommandLine.Text.HeadingInfo.Empty; + h.MaximumDisplayWidth = 110; + // h.AddVerbs(typeof(SyncOptions), typeof(QueryOptions), typeof(TokenOptions)); + return h; // only h + }); + Console.WriteLine(helpText); + return 1; + } + } +} -- cgit v1.3.1