Пример #1
0
            public bool ParseArgs(string[] args)
            {
                GetOpt programArgs = new GetOpt(args);

                try
                {
                    programArgs.SetOpts(new string[] {"d", "x", "e", "r", "o="});
                    programArgs.Parse();
                }
                catch (ArgumentException e)
                {
                    Console.WriteLine(e.Message);
                    return false;
                }

                _Debug = programArgs.IsDefined("d");
                _ForceENaming = programArgs.IsDefined("e");
                _ForceXNaming = programArgs.IsDefined("x");
                _UseRelativeNaming = programArgs.IsDefined("r");

                if (programArgs.IsDefined("o"))
                {
                    _OutputPath = programArgs.GetOptionArg("o");
                }

                _PathList.Clear();

                foreach (string s in programArgs.Args)
                {
                    _PathList.Add(s);
                }

                return true;
            }
Пример #2
0
            public bool ParseArgs(string[] args)
            {
                GetOpt programArgs = new GetOpt(args);

                try
                {
                    programArgs.SetOpts(new string[] { "d" });
                    programArgs.Parse();
                }
                catch (ArgumentException e)
                {
                    Console.WriteLine(e.Message);
                    return false;
                }

                _Debug = programArgs.IsDefined("d");

                _PathList.Clear();

                foreach (string s in programArgs.Args)
                {
                    _PathList.Add(s);
                }

                return true;
            }