public void RefreshMachine(object para) { try { AppContainer ctl = (AppContainer)para; for (int i = 0; i < 3; i++) { bool CanPing = false; ctl.RunRefreshMachine(ref CanPing); if (ctl.RunnerState == RunnerState.Success) { break; } } } catch (Exception ex) { Logger.Writer.Write(ex); } finally { int opcode = Interlocked.Decrement(ref this._OPCode); if (opcode == 0) { CanRun(true); } } }