Mono.Tools.CertSync.ParseOptions C# (CSharp) Method

ParseOptions() static private method

static private ParseOptions ( string args ) : bool
args string
return bool
        static bool ParseOptions(string[] args)
        {
            if (args.Length < 1)
                return false;

            for (int i = 0; i < args.Length - 1; i++) {
                switch (args [i]) {
                case "--quiet":
                    quiet = true;
                    break;
                case "--user":
                    userStore = true;
                    break;
                default:
                    WriteLine ("Unknown option '{0}'.", args[i]);
                    return false;
                }
            }
            inputFile = args [args.Length - 1];
            if (!File.Exists (inputFile)) {
                WriteLine ("Unknown option or file not found '{0}'.", inputFile);
                return false;
            }
            return true;
        }