static void Main(string[] args) { IKrediManager ihtiyacKrediManager = new IhtiyacKrediManager(); IKrediManager konutKrediManager = new KonutKrediManager(); IKrediManager tasitKrediManager = new TasitKrediManager(); ILoggerService databaseLoggerService = new DatabaseLoggerService(); ILoggerService fileLoggerService = new FileLoggerService(); ILoggerService mailLoggerService = new MailLoggerService(); BasvuruManager basvuruManager = new BasvuruManager(); basvuruManager.BasvuruYap(ihtiyacKrediManager, mailLoggerService); List <IKrediManager> krediManagers = new List <IKrediManager>() { ihtiyacKrediManager, tasitKrediManager, new AraçKrediManager() }; List <ILoggerService> loggerServices = new List <ILoggerService>() { fileLoggerService, mailLoggerService }; basvuruManager.KrediOnBilgilendirmeYap(krediManagers, loggerServices); }
static void Main(string[] args) { // bu şekilde de newlenebilir. //IKrediManager ihtiyacKrediManager = new IhtiyacKrediManager(); //IKrediManager tasitKrediManager = new TasitKrediManager(); //IKrediManager konutKrediManager = new KonutKrediManager(); //ILoggerService databaseLoggerService = new DatabaseLoggerService(); //ILoggerService fileLoggerService = new FileLoggerService(); BasvuruManager basvuruManager = new BasvuruManager(); // direkt new olarakda yazılabilir. basvuruManager.BasvuruYap(new IhtiyacKrediManager(), new List <ILoggerService> { new DatabaseLoggerService(), new SmsLoggerService() }); basvuruManager.BasvuruYap(new EsnafKredisiManager(), new List <ILoggerService> { new FileLoggerService(), new SmsLoggerService() }); //basvuruManager.BasvuruYap(tasitKrediManager); //basvuruManager.BasvuruYap(konutKrediManager); List <IKrediManager> krediManagers = new List <IKrediManager>() { new IhtiyacKrediManager(), new TasitKrediManager(), new KonutKrediManager() }; List <ILoggerService> logServices = new List <ILoggerService>() { new FileLoggerService(), new SmsLoggerService(), new DatabaseLoggerService() }; basvuruManager.KrediOnBilgilendirmeYap(krediManagers, logServices); }