Exemplo n.º 1
0
 public PBOList DeleteFromArray(PBOList list, PBO pbo)
 {
     foreach (PBO p in list)
     {
         if ((p.fileHash == pbo.fileHash) && (p.fileName == pbo.fileName))
         {
             list.Remove(p);
             return(list);
         }
         ;
     }
     return(list);
 }
Exemplo n.º 2
0
        //the return list contains a list of files not present in the remote repo (Deletion List)
        public PBOList DeleteList(PBOList remote)
        {
            PBOList diff = this;

            foreach (PBO diffPBO in diff)
            {
                foreach (PBO remotePBO in remote)
                {
                    if (remotePBO.hash == diffPBO.hash)
                    {
                        diff.Remove(diffPBO);
                    }
                }
            }

            return(diff);
        }