示例#1
0
        /// <summary>
        /// 更新后操作(启动或关闭进程)
        /// </summary>
        /// <param name="vm"></param>
        private void AfterUpdate()
        {
            List <string> kill  = new List <string>();
            List <string> start = new List <string>();

            VersionModelList?.ForEach(x =>
            {
                if (ListTool.HasElements(x.AfterUpdateKillProcess))
                {
                    foreach (var item in x.AfterUpdateKillProcess)
                    {
                        if (!kill.Contains(item))
                        {
                            kill.Add(item);
                        }
                    }
                }

                if (ListTool.HasElements(x.AfterUpdateStartProcess))
                {
                    foreach (var item in x.AfterUpdateStartProcess)
                    {
                        if (!start.Contains(item))
                        {
                            start.Add(item);
                        }
                    }
                }
            });
            ProcessHelper.AfterUpdate(kill, start);
        }