public ServiceResult <bool> PreperationFinished(int threadID) { var result = new ServiceResult <bool>() { Success = true }; try { Thread thread = ThreadList.Find(t => t.GetHashCode() == threadID); if (thread != null) { result.Data = !thread.IsAlive; } else { throw new Exception("Thread with ID " + threadID + " not found!"); } } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }