public void RefreshState() { var attempt = 0; while (true) { try { foreach (var dataReader in dbBuilder.Load(Environment.MachineName, Settings.Current.Builder.Version)) { Builder.SetFrom(dataReader); } break; } catch (Exception e) { attempt++; if (attempt == 10) { throw; } } } }
public void RefreshState() { foreach (var dataReader in dbBuilder.Load(Environment.MachineName)) { Builder.SetFrom(dataReader); } }