Пример #1
0
        public override void ExecuteCommand(TransferSocket session, TransferSocketCommandInfo commandInfo)
        {
            if (session.TransferStatus < 100)//表示上传
            {
                if (commandInfo.Text == "1")//上传时服务器存在相同的文件
                {
                    if (session.OnFileExist())//返回真则覆盖处理
                    {
                        session.OnCheckFile();
                    }
                }
                else
                {
                    session.OnCheckFile();
                }
            }
            else//下载
            {

            }
        }
Пример #2
0
 public override void ExecuteCommand(TransferSocket session, TransferSocketCommandInfo commandInfo)
 {
     System.Console.WriteLine(commandInfo.Text);
 }
Пример #3
0
 public override void ExecuteCommand(TransferSocket session, TransferSocketCommandInfo commandInfo)
 {
     session.OnDoData();
 }
 private void ExecuteCommand(TransferSocketCommandInfo commandInfo)
 {
     ICommand<TransferSocket, TransferSocketCommandInfo> command;
     if (m_CommandDict.TryGetValue(commandInfo.Key, out command))
     {
         command.ExecuteCommand(this, commandInfo);
     }
 }