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); }
//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); }