Exemple #1
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="dirA"></param>
        /// <param name="dirB"></param>
        public DirComparison(string dirA, string dirB)
        {
            this.DirA = dirA;
            this.DirB = dirB;
            ListA     = DirComparison.Parse(dirA);
            ListB     = DirComparison.Parse(dirB);

            DiffersInA = new List <DirItem>();
            foreach (DirItem item in ListA)
            {
                if (!ListB.Contains(item))
                {
                    DiffersInA.Add(item);
                }
            }
            DiffersInB = new List <DirItem>();
            foreach (DirItem item in ListB)
            {
                if (!ListA.Contains(item))
                {
                    DiffersInB.Add(item);
                }
            }
        }