From 4c2b8a82e384c8c1194909facf67b9fcebbc270d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miskolczi=20Rich=C3=A1rd?= Date: Sun, 16 Apr 2023 20:45:13 +0200 Subject: [PATCH] Adding Main method, only help message is handled now --- CLI/Program.cs | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/CLI/Program.cs b/CLI/Program.cs index 1f51d40..bc8a16f 100644 --- a/CLI/Program.cs +++ b/CLI/Program.cs @@ -3,9 +3,32 @@ namespace CLI; class Program { - static void Main(string[] args) static string BINARY_NAME = "pass"; + + static int Main(string[] args) { - + //ConfigFileManager.ExceptionOccured += (e) => ErrorOccured(e); + //ConfigFileManager.Init(); + + if (args.Length == 0) + { + ListPasswords(); + return 0; + } + else + { + switch (args[0]) + { + case "help": + HelpMessage(); + break; + default: + HelpMessage(); + break; + } + } + + return 0; + } } }