コード例 #1
0
ファイル: Program.cs プロジェクト: samcf111/unityMono5.5.0
        public static void Main(string[] args)
        {
            string monoPath = null;
            string optName  = null;

            var argIndex = 0;

            while (argIndex < args.Length)
            {
                if (args [argIndex] == "--mono")
                {
                    monoPath  = args [argIndex + 1];
                    argIndex += 2;
                }
                else if (args [argIndex] == "--opt")
                {
                    optName   = args [argIndex + 1];
                    argIndex += 2;
                }
                else if (args [argIndex] == "--help")
                {
                    UsageAndExit(0);
                }
                else if (args [argIndex] == "--")
                {
                    argIndex += 1;
                    break;
                }
                else
                {
                    UsageAndExit(1);
                }
            }

            if (monoPath == null || optName == null || argIndex == args.Length)
            {
                UsageAndExit(1);
            }

            var bisectInfo = new BisectInfo {
                MonoPath = monoPath,
                OptName  = optName,
                Args     = args.Skip(argIndex)
            };
            var success = bisectInfo.Bisect();

            Environment.Exit(success ? 0 : 1);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: Profit0004/mono
		public static void Main (string[] args)
		{
			string monoPath = null;
			string optName = null;

			var argIndex = 0;
			while (argIndex < args.Length) {
				if (args [argIndex] == "--mono") {
					monoPath = args [argIndex + 1];
					argIndex += 2;
				} else if (args [argIndex] == "--opt") {
					optName = args [argIndex + 1];
					argIndex += 2;
				} else if (args [argIndex] == "--help") {
					UsageAndExit (0);
				} else if (args [argIndex] == "--") {
					argIndex += 1;
					break;
				} else {
					UsageAndExit (1);
				}
			}

			if (monoPath == null || optName == null || argIndex == args.Length)
				UsageAndExit (1);

			var bisectInfo = new BisectInfo {
				MonoPath = monoPath,
				OptName = optName,
				Args = args.Skip (argIndex)
			};
			var success = bisectInfo.Bisect ();
			Environment.Exit (success ? 0 : 1);
		}