private static void SetUp() { Settings.SettingsList = JsonConverter. Deserialize <List <Settings> >(FileWorker.Read("settings.json")); Settings.SettingsList.RemoveAll(s => s == null); PrimesListLocker.SetWaiter(Settings.SettingsList.Count); }
static void Main(string[] args) { var exception = "null"; bool success = true; var timer = Stopwatch.StartNew(); var primes = new List <int>(); try { SetUp(); primes = PrimesListLocker.GetPrimes(); } catch (Exception e) { exception = e.GetType().ToString(); success = false; primes = null; } timer.Stop(); TearDown(exception, success, timer.Elapsed, primes); }