예제 #1
0
파일: Program.cs 프로젝트: dbremner/smokey
        private static bool DoValidate(GetOptions options)
        {
            bool valid = true;

            // -exe and -asm are required
            if (!options.Has("-exe"))
            {
                Console.Error.WriteLine("-exe is required");
                valid = false;
            }
            if (!options.Has("-asm"))
            {
                Console.Error.WriteLine("-asm is required");
                valid = false;
            }

            // should not be any operands
            if (options.Operands.Length > 0)
            {
                Console.Error.WriteLine("operands are not supported");
                valid = false;
            }

            return(valid);
        }
예제 #2
0
파일: Program.cs 프로젝트: dbremner/smokey
        private static bool DoProcessOptions(GetOptions options)
        {
            bool processed = true;

            if (options.Has("-help"))
            {
                DoShowHelp(options);
            }

            else if (options.Has("-version"))
            {
                DoShowVersion();
            }

            else
            {
                processed = false;
            }

            return(processed);
        }