public bool CheckFileInUse(string fileName)
 {
     if (BasicFunc.IsFileInUse(fileName))
     {
         bool result = true;
         lock (m_asyncSocketServer.DownloadSocketProtocolMgr)
         {
             DownloadSocketProtocol downloadProtocol = null;
             for (int i = 0; i < m_asyncSocketServer.DownloadSocketProtocolMgr.Count(); i++)
             {
                 downloadProtocol = m_asyncSocketServer.DownloadSocketProtocolMgr.ElementAt(i);
                 if (fileName.Equals(downloadProtocol.FileName, StringComparison.CurrentCultureIgnoreCase))
                 {
                     lock (downloadProtocol.AsyncSocketUserToken)
                     {
                         m_asyncSocketServer.CloseClientSocket(downloadProtocol.AsyncSocketUserToken);
                     }
                     result = false;
                 }
             }
         }
         return(result);
     }
     else
     {
         return(true);
     }
 }
 public void Remove(DownloadSocketProtocol value)
 {
     m_list.Remove(value);
 }
 public void Add(DownloadSocketProtocol value)
 {
     m_list.Add(value);
 }