private static void ArabaKirala(string threadName) { Galeri galeri = Galeri.GetInstance; Araba arabam = galeri.AracKirala(threadName); if (arabam == null) { GaleriyeGit(galeri, arabam, threadName); } Thread.Sleep(3000); ArabaGeriVer(threadName); }
private static void GaleriyeGit(Galeri galeri, Araba arabam, string threadName) { while (true) { Thread.Sleep(1000); arabam = galeri.AracKirala(threadName); if (arabam != null) { break; } } }