Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            if (args.Length >= 4)
            {
                string modeStr, srcProj, destProj, diffOutputDir;

                modeStr       = args[0];
                srcProj       = args[1];
                destProj      = args[2];
                diffOutputDir = args[3];

                ArtifactsDiffer differ = new ArtifactsDiffer(srcProj, destProj, true);

                if ("-skipnotes".Equals(modeStr))
                {
                    differ.skipElementTPosFlg   = true;
                    differ.skipAttributeNoteFlg = true;
                    differ.skipMethodNoteFlg    = true;
                    differ.skipAttributePosFlg  = true;
                    differ.skipMethodPosFlg     = true;
                }
                else if ("-all".Equals(modeStr))
                {
                    differ.skipElementTPosFlg   = false;
                    differ.skipAttributeNoteFlg = false;
                    differ.skipMethodNoteFlg    = false;
                    differ.skipAttributePosFlg  = false;
                    differ.skipMethodPosFlg     = false;
                }

                // outputDirで指定される出力フォルダを作成する(存在しない場合)
                createOutputDirIfNotExist(diffOutputDir);

                // 比較クラスに出力フォルダパスを渡す
                differ.outputDir = diffOutputDir;

                // Left,Right両方の成果物をファイルから読み込み
                differ.readBothArtifacts();
                // 成果物単位でのマージ実行
                differ.mergeAllArtifacts();
                // マージ後に残った差異分の成果物をファイル出力
                differ.outputMerged();
            }
            else
            {
                Console.WriteLine("引数が足りません");
                Console.WriteLine("usage: ProjectDiffMaker.exe <動作モード(-all/-skipnotes)> <比較元Project(.bdprj)> <比較先Project(.bdprj)> <diffOutputDir> ");
            }

//			Console.Write("Press any key to continue . . . ");
//			Console.ReadKey(true);
        }
Exemplo n.º 2
0
        public static void Main(string[] args)
        {
            //コマンドライン引数を配列で取得する
            string[] cmds = System.Environment.GetCommandLineArgs();

            if (cmds.Length >= 4)
            {
                ArtifactsDiffer differ = new ArtifactsDiffer(cmds[2], cmds[3]);

                if ("-skipnotes".Equals(cmds[1]))
                {
                    differ.skipElementTPosFlg   = true;
                    differ.skipAttributeNoteFlg = true;
                    differ.skipMethodNoteFlg    = true;
                    differ.skipAttributePosFlg  = true;
                    differ.skipMethodPosFlg     = true;
                }
                else if ("-all".Equals(cmds[1]))
                {
                    differ.skipElementTPosFlg   = false;
                    differ.skipAttributeNoteFlg = false;
                    differ.skipMethodNoteFlg    = false;
                    differ.skipAttributePosFlg  = false;
                    differ.skipMethodPosFlg     = false;
                }

                // outputDirで指定される出力フォルダを作成する(存在しない場合)
                createOutputDirIfNotExist(cmds[4]);
                differ.outputDir = cmds[4];

                differ.readBothArtifacts();

                differ.mergeAllArtifacts();
                differ.outputMerged();
            }
            else
            {
                Console.WriteLine("引数が足りません");
                Console.WriteLine("usage: ProjectDiffMaker.exe <動作モード(-all/-skipnotes)> <比較元Dir> <比較先Dir> <diffOutputDir> ");
            }

//			Console.Write("Press any key to continue . . . ");
//			Console.ReadKey(true);
        }
 public void TestMethod()
 {
     ArtifactsDiffer differ = new ArtifactsDiffer(@"C:\DesignHistory\ea-artifacts\cuvic_aswea_master\20171208\project.bdprj",
                                                  @"C:\DesignHistory\ea-artifacts\cuvic_aswea_20180118\20180125\project.bdprj");
     // differ.mergeAllArtifacts();
 }