public bool IsCorrect() { bool flag = true; if (String.IsNullOrWhiteSpace(Name)) { flag = false; } else if (Name.Contains("Default")) { flag = false; } if (String.IsNullOrWhiteSpace(Author)) { flag = false; } else if (Author.Contains("Default")) { flag = false; } if (String.IsNullOrWhiteSpace(Publicher)) { flag = false; } else if (Publicher.Contains("Default")) { flag = false; } if (Price < 0) { flag = false; } return(flag); }
public void testConsumerRabbit() { for (int i = 0; i < consumers; i++) { Consumer c = new Consumer("Consumer nr. " + (i + 1) + "/" + consumers, antal); //pull messages Task.Run(() => c.StartPull(antal)).ContinueWith(DoneRabbit, c); //push messages //Task.Run(() => c.Start()).ContinueWith(Done,c); } start = DateTime.Now; Publicher p = new Publicher(); p.Create(antal, presist); }