Beispiel #1
0
        private static string[] GetArguments(App app)
        {
            if (Development.IsAttached)
            {
                var args = app.Console.Read(Strings.CmdIndicator);
                return(ConsoleAppHelper.StringToArgs(args));
            }

            var listArgs = Environment.GetCommandLineArgs().ToList();

            // remove the app path that added auto by .net
            listArgs.RemoveAt(0);

            return(listArgs.ToArray());
        }
Beispiel #2
0
 private static string[] GetArguments(App app, string shellName)
 {
     return(ConsoleAppHelper.StringToArgs(app.Console.Read(shellName.TrimEnd() + ">", false)));
 }
Beispiel #3
0
 /// <summary>
 /// Run the application
 /// </summary>
 /// <param name="arg">Command line as string</param>
 /// <returns>Return the application result</returns>
 public ApplicationResult Run(string arg)
 {
     return(this.Run(ConsoleAppHelper.StringToArgs(arg)));
 }