Example #1
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     if (server != null)
     {
         server.Remove(this);
         server = null;
     }
 }
Example #2
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     if (Server != null)
     {
         Server.Remove(this);
         Server = null;
         //new ProcessCopyerServerCall(this, ProcessCopyerServerCall.CallType.Remove).CheckCall(Net.TcpServer.ServerTaskType.QueueLink, Server.TcpServer);
     }
 }
        /// <summary>
        /// 删除进程文件复制
        /// </summary>
        public override void RunTask()
        {
            switch (type)
            {
            case CallType.Remove: server.Remove(processCopyer); return;

            case CallType.Start: processCopyer.Start(); return;
            }
        }
Example #4
0
 /// <summary>
 /// 守护启动进程
 /// </summary>
 internal void Start()
 {
     try
     {
         ProcessCopyServer server = Server;
         if (server != null)
         {
             Server = null;
             server.Remove(this);
         }
         if (System.IO.File.Exists(Process))
         {
             start();
         }
         else
         {
             log.Add(AutoCSer.Log.LogType.Error, "没有找到文件 " + Process);
         }
     }
     catch (Exception error)
     {
         log.Add(AutoCSer.Log.LogType.Error, error, "进程启动失败 " + Process);
     }
 }