コード例 #1
0
 public bool Remove(SharedFile sharedFile)
 {
     try
     {
         Lock();
         m_ThriceHashedFileHash.Remove(sharedFile.ThriceHashedFileHashString);
         m_TwiceHashedFileHash.Remove(sharedFile.TwiceHashedFileHashString);
         m_OnceHashedFileHash.Remove(sharedFile.OnceHashedFileHashString);
         return(m_FileHash.Remove(sharedFile.FileHashString));
     }
     finally
     {
         Unlock();
     }
 }
コード例 #2
0
 public bool Remove(Download download)
 {
     try
     {
         Lock();
         m_ThriceHashedFileHash.Remove(download.ThriceHashedFileHashString);
         m_TwiceHashedFileHash.Remove(download.TwiceHashedFileHashString);
         m_OnceHashedFileHash.Remove(download.OnceHashedFileHashString);
         m_FileHash.Remove(download.FileHashString);
         return(m_DownloadID.Remove(download.DownloadIDString));
     }
     finally
     {
         Unlock();
     }
 }