コード例 #1
0
        static void Main(string[] args)
        {
            ICrediManager ihtiyacCrediManager = new IhtiyacCrediManager();
            ICrediManager tasitCrediManager   = new TasitCrediManager();
            ICrediManager konutCrediManager   = new KonutCrediManager();

            ILoggerService databaseLoggerService = new DatabaseLoggerService();
            ILoggerService fileLoggerService     = new FileLoggerService();

            BasvuruManager basvuruManager = new BasvuruManager();

            basvuruManager.BasvuruYap(new EsnafCreditManager(), new SmsLoggersService());

            List <ICrediManager> credits = new List <ICrediManager> {
                ihtiyacCrediManager, tasitCrediManager, konutCrediManager
            };

            //basvuruManager.KrediOnBilgilendirmesiYap(credits);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: sevcanozdemir/Interface-
        static void Main(string[] args)
        {
            ICrediManager ihtiyacKrediManager = new IhtiyacCrediManager();
            ICrediManager tasitKrediManager   = new TasitKrediManager();
            ICrediManager konutKrediManager   = new KonutKrediManager();

            ILoggerService databaseLoggerService = new DatabaseLoggerService();
            ILoggerService fileLoggerService     = new FileLoggerService();

            BasvuruManager basvuruManager = new BasvuruManager();

            basvuruManager.BasvuruYap(ihtiyacKrediManager, databaseLoggerService);

            List <ICrediManager> krediler = new List <ICrediManager>()
            {
                ihtiyacKrediManager, tasitKrediManager
            };

            //basvuruManager.KrediOnBilgilendirmesiYap(krediler);
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: toprakyc/Kamp
        static void Main(string[] args)
        {
            //IhtiyacCrediManager ihtiyacCrediManager = new IhtiyacCrediManager();
            //ihtiyacCrediManager.Calculate();

            //KonutCrediManager konutCrediManager = new KonutCrediManager();
            //konutCrediManager.Calculate();

            //TasitCrediManager tasitCrediManager = new TasitCrediManager();
            //tasitCrediManager.Calculate();

            Console.WriteLine("----------------------------------------");

            ICrediManager ihtiyacCrediManager1 = new IhtiyacCrediManager();
            ICrediManager konutCrediManager1   = new KonutCrediManager();
            ICrediManager tasitCrediManager1   = new TasitCrediManager();
            //demekki interfacelerde kendilerini implement eden sınıfların
            //referanslarını tutabilir tıpkı base classlar gibi..

            ILoggerService databaseLoggerService = new DatabaseLoggerService();
            ILoggerService fileLoggerService     = new FileLoggerService();

            BasvuruManager basvuruManager = new BasvuruManager();

            basvuruManager.BasvuruYap(new EsnafCrediManager(), new List <ILoggerService>()
            {
                new DatabaseLoggerService(), new SmsLoggerService()
            });                                                       //polymorphism
            //ne yazarsak onun metodu
            //çalışır(abstraction)

            List <ICrediManager> krediler = new List <ICrediManager>()
            {
                ihtiyacCrediManager1,
                konutCrediManager1, tasitCrediManager1
            };
            //basvuruManager.CrediOnBilgilendirmesiYap(krediler);
        }