Ejemplo n.º 1
0
 public void RunTask(ref AutoCSer.Threading.ISwitchTaskNode next, ref long currentTaskTimestamp)
 {
     next = NextTask;
     currentTaskTimestamp = TaskTimestamp;
     NextTask             = null;
     onReceiveTask();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 执行任务
        /// </summary>
        /// <param name="next"></param>
        /// <param name="currentTaskTimestamp"></param>
        public void RunTask(ref AutoCSer.Threading.ISwitchTaskNode next, ref long currentTaskTimestamp)
        {
            next = NextSwitchTask;
            currentTaskTimestamp = SwitchTimestamp;
            NextSwitchTask       = null;
            try
            {
                switch (linkTaskType)
                {
                case BoundaryReceiveLinkTaskType.WriteFile:
                    if (writeFile())
                    {
                        return;
                    }
                    break;

                case BoundaryReceiveLinkTaskType.GetFile:
                    if (getFile())
                    {
                        return;
                    }
                    break;

                case BoundaryReceiveLinkTaskType.GetFileFinally:
                    if (getFileFinally())
                    {
                        return;
                    }
                    break;
                }
            }
            catch (Exception error)
            {
                httpSocket.DomainServer.RegisterServer.TcpServer.Log.Exception(error, null, LogLevel.Exception | LogLevel.AutoCSer);
            }
            this.error();
        }