| | |
| | | foreach (var item in IProcess.dicProcesses) |
| | | { |
| | | if (NodeName.StartsWith(item.Key)) |
| | | { |
| | | return item.Value.ToString(); |
| | | } |
| | | } |
| | | |
| | | return string.Empty; |
| | |
| | | /// <summary> |
| | | /// 运行标记 |
| | | /// </summary> |
| | | public bool bPruning |
| | | public bool bRuning |
| | | { |
| | | set |
| | | { |
| | |
| | | /// <returns></returns> |
| | | public bool Run() |
| | | { |
| | | bPruning = true; |
| | | bRuning = true; |
| | | bCompleted = false; |
| | | |
| | | DateTime StartTime = DateTime.Now; |
| | | try |
| | | { |
| | |
| | | Result = false; |
| | | Msg = string.Format("运行发送了意外{0}", ex.Message.Trim()); |
| | | } |
| | | |
| | | RunTime = (DateTime.Now - StartTime).TotalMilliseconds; |
| | | |
| | | bPruning = false; |
| | | bRuning = false; |
| | | bCompleted = true; |
| | | |
| | | if (Result) |
| | | { |
| | | total_OK++; |
| | | Msg = "运行成功"; |
| | | } |
| | | else |
| | | { |
| | | total_NG++; |
| | | |
| | | } |
| | | if (IProcess.dicGlobalVars.ContainsKey($"{Name}.Result")) |
| | | { |
| | | IProcess.dicGlobalVars[$"{Name}.Result"] = Result; |
| | | } |
| | | else |
| | | { |
| | | IProcess.dicGlobalVars.TryAdd($"{Name}.Result", Result); |
| | | |
| | | } |
| | | if (IProcess.dicGlobalVars.ContainsKey($"{Name}.Msg")) |
| | | { |
| | | IProcess.dicGlobalVars[$"{Name}.Msg"] = Msg; |
| | | } |
| | | else |
| | | { |
| | | IProcess.dicGlobalVars.TryAdd($"{Name}.Msg", Msg); |
| | | |
| | | } |
| | | // 手动触发垃圾回收 |
| | | GC.Collect(); |
| | | return Result; |