Exemple #1
0
        private static int Main(string[] args)
        {
            if (args.Length != 0)
            {
                return((int)ReturnValue.InvalidArgumentCode);
            }

            HelperTools.SetupEncoding();

            try
            {
                foreach (var result in ScriptManager.GetScripts())
                {
                    var converted = result.Select(x => new KeyValuePair <string, object>(x.Key, x.Value)).ToList();
                    Console.WriteLine(HelperTools.KeyValueListToConsoleOutput(converted));
                }

                return((int)ReturnValue.OkCode);
            }
            catch (IOException ex)
            {
                LogWriter.WriteExceptionToLog(ex);
                return(HelperTools.HandleHrefMessage(ex));
            }
            catch (Exception ex)
            {
                LogWriter.WriteExceptionToLog(ex);
                return((int)ReturnValue.FunctionFailedCode);
            }
        }
Exemple #2
0
        private static int Main(string[] args)
        {
            if (args.Length == 0)
            {
                return((int)ReturnValue.InvalidArgumentCode);
            }

            HelperTools.SetupEncoding();

            if (args.Length == 1 && string.Equals(args[0], @"/query", StringComparison.OrdinalIgnoreCase))
            {
                try
                {
                    var result = OculusManager.QueryOculusApps();
                    foreach (var app in result)
                    {
                        Console.WriteLine(HelperTools.ObjectToConsoleOutput(app));
                    }
                    return((int)ReturnValue.OkCode);
                }
                catch (IOException ex)
                {
                    LogWriter.WriteExceptionToLog(ex);
                    return(HelperTools.HandleHrefMessage(ex));
                }
            }