Exemple #1
0
        /// <summary>
        /// 获取当前FTP操作上下文
        /// </summary>
        /// <returns>OperateContext</returns>
        private OperateContext GetCurrentContext()
        {
            string szThreadID =
                Thread.CurrentThread.ManagedThreadId.ToString();
            OperateContext context = null;

            if (this.m_contexts.ContainsKey(szThreadID))
            {
                context = this.m_contexts[szThreadID];
            }
            if (context != null)
            {
                return(context);
            }
            context = new OperateContext(szThreadID, this.m_ftpIP
                                         , this.m_ftpPort, this.m_ftpMode, this.m_userName, this.m_password);
            this.m_contexts.Add(szThreadID, context);
            return(context);
        }
Exemple #2
0
 /// <summary>
 /// ��ȡ��ǰFTP����������
 /// </summary>
 /// <returns>OperateContext</returns>
 private OperateContext GetCurrentContext()
 {
     string szThreadID =
        Thread.CurrentThread.ManagedThreadId.ToString();
     OperateContext context = null;
     if (this.m_contexts.ContainsKey(szThreadID))
         context = this.m_contexts[szThreadID];
     if (context != null)
         return context;
     context = new OperateContext(szThreadID, this.m_ftpIP
         , this.m_ftpPort, this.m_ftpMode, this.m_userName, this.m_password);
     this.m_contexts.Add(szThreadID, context);
     return context;
 }