Beispiel #1
0
 public void Add(SharedFile sharedFile)
 {
     try
     {
         Lock();
         m_FileHash.Add(sharedFile.FileHashString, sharedFile);
         m_OnceHashedFileHash.Add(sharedFile.OnceHashedFileHashString, sharedFile.FileHashString);
         m_TwiceHashedFileHash.Add(sharedFile.TwiceHashedFileHashString, sharedFile.FileHashString);
         m_ThriceHashedFileHash.Add(sharedFile.ThriceHashedFileHashString, sharedFile.FileHashString);
     }
     finally
     {
         Unlock();
     }
 }
 public void Add(Download download)
 {
     try
     {
         Lock();
         m_DownloadID.Add(download.DownloadIDString, download);
         m_FileHash.Add(download.FileHashString, download.DownloadIDString);
         m_OnceHashedFileHash.Add(download.OnceHashedFileHashString, download.DownloadIDString);
         m_TwiceHashedFileHash.Add(download.TwiceHashedFileHashString, download.DownloadIDString);
         m_ThriceHashedFileHash.Add(download.ThriceHashedFileHashString, download.DownloadIDString);
     }
     finally
     {
         Unlock();
     }
 }