Example #1
0
        static void Main(string[] args)
        {
            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            ICreditManager transportCreditManager       = new TransportCreditManager();
            ICreditManager mortgageCreditManager        = new MortgageCreditManager();

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

            List <ILoggerService> loggers = new List <ILoggerService>()
            {
                databaseLoggerService, smsLoggerService
            };

            ApplicationManager applicationManager = new ApplicationManager();

            applicationManager.Apply(new ArtisanCreditManager(), loggers);

            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personalFinanceCreditManager, transportCreditManager
            };
            //applicationManager.MakeCreditPreNotification(credits);
        }
Example #2
0
        static void Main(string[] args)
        {
            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            ICreditManager transportCreditManager       = new TransportCreditManager();
            ICreditManager mortgageLoanCreditManager    = new MortgageLoanCreditManager();
            ICreditManager artisanLoanCreditManager     = new ArtisanLoanCreditManager();

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

            List <ILoggerService> logger = new List <ILoggerService>()
            {
                databaseLoggerService, smsloggerService
            };

            RecourseManager recourseManager = new RecourseManager();

            recourseManager.ToApply(transportCreditManager, new List <ILoggerService> {
                fileLoggerService
            });
            Console.WriteLine("------------------------------------");
            recourseManager.ToApply(artisanLoanCreditManager, logger);

            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personalFinanceCreditManager, transportCreditManager
            };

            //recourseManager.CreditPreNotification(credits);
        }
Example #3
0
        static void Main(string[] args)
        {
            //PersonalFinanceCreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            //personalFinanceCreditManager.Calculate();

            //TransportCreditManager transportCreditManager = new TransportCreditManager();
            //transportCreditManager.Calculate();

            //MortageLoanManager mortageLoanManager = new MortageLoanManager();
            //mortageLoanManager.Calculate();


            // Interface lerde imlemente edildiği Clasın referans numarasını tutar.
            // Yukarıda ki kullanımda doğru  aşağıdaki kullanımda


            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            ICreditManager transportCreditManager       = new TransportCreditManager();
            ICreditManager mortageLoanManager           = new MortageLoanManager();
            ILoggerService dataLoggerService            = new DatabaseLoggerService();
            ILoggerService filLoggerService             = new FileLoggerService();

            // şimdi çok güzel bir şekilde yapı kurduk istersek kodumuzu hiç değiştirmeden sadece class ekleyip yeni kredi türleri ve loglama işlemi yapabiliriz.
            // SOLID kurallarının O kısmı bu
            ICreditManager tradesmanLoanManager = new TradesmanLoanManager();
            ILoggerService smsLoggerService     = new SmsLoggerService();

            // ***** interfaceleri biribirinin alternatifi olan ama kod içerikleri farklı olan içerikler için kullanırız.
            // projemizde loglama yapmak istiyoruz. Loglama:Kim ne zaman hangi operasyonu çağırdı.
            // Loglarımızı bir dosyada tutabiliriz
            // loglarımızı veri tabanında tutabiliriz.
            // loglarımızı sms olarakta atabiliriz vb şeyler.
            // İstenebilir hepsi aynı şeyi loglamayı yapıyor ama farklı işlemler yani interface kullanırız.
            // bizden 1 tanesi bile istense interface kullanmamız lazım ileride değişiklik istediğini düşün
            // müşterinin interfacesiz yaparsan bütün sistemin gidebilir tekrar uğraşırsın

            List <ILoggerService> loggerServices = new List <ILoggerService>()
            {
                new DatabaseLoggerService(),
                new SmsLoggerService()
            };

            List <ICreditManager> creditManagers = new List <ICreditManager>()
            {
                new PersonalFinanceCreditManager(),
                new TransportCreditManager()
            };
            // recourseManager.KrediOnBilgilendirmesiYap(creditManagers);


            RecourseManager recourseManager = new RecourseManager();

            recourseManager.BasvuruYap(tradesmanLoanManager, loggerServices);

            // Senaryomuz şu bir müşteririmiz var bankaya kredi çekmeye gidiyor araba kredisi çekicek bankacı soruyor taşıt kredisimi istersiniz yoksa ihtiyaç kredisimi diye
            // şimdi tek kredi hesaplama yapabiliyoruz ama burda 2 tane kredi aynı anda istendi bu yüzden aşağıdki işlemi yapıyoruz.
            // 2 değil 100 de istenebilir 1000 de vb. bu yüzden herşeyi düşünerek yazılması lazım
            // aşağıdaki mantık bi liste ytanımladık içine Bizim kredilerin babası sayılan ICreditManager ı attık yani istediğimiz bütün kredileri kolaylıkla çağırabiliriz.
            // sonrada RecourseManagerda yazdığımız fonksiyonumuzu çağırdık bu fonksiyonda da parametre olarak list ICreditManager verdik böylece bütün kredileri çağırabilmemizi sağladık.
        }
Example #4
0
        //interfaceleri birbirinin alternatifi olan ama kod içerikleri farklı olan durumlar için kullanırız. İmzaları aynı.
        //Yapılan işlemler loglamadır. SMS yollama, veritabanına yazma gibi şeyler loglama.
        static void Main(string[] args)
        {
            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            ICreditManager vehicleCreditManager         = new VehicleCreditManager();
            ICreditManager housingCreditManager         = new HousingCreditManager();
            ICreditManager esnafKrediManager            = new EsnafKrediManager();

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

            RecourseManager recourseManager = new RecourseManager();

            recourseManager.BasvuruYap(esnafKrediManager, new List <ILoggerService> {
                new DatabaseLoggerService(), new SmsLoggerService()
            });

            //line 22'de parantez içinde new list oluşturmak yerine aşağıdaki alternatifi de kullanabilirsin:
            //List<ILoggerService> logger = new List<ILoggerService>() {new SmsLoggerService(), new DatabaseLoggerService() };
            //yukarıdaki kodu yazdıktan sonra line 22'deki kod aşağıdaki gibi olacak:
            //recourseManager.BasvuruYap(esnafKrediManager, loggers);

            List <ICreditManager> krediler = new List <ICreditManager>()
            {
                personalFinanceCreditManager, vehicleCreditManager
            };

            //recourseManager.KrediOnBilgilendirmesiYap(krediler);
        }
Example #5
0
        static void Main(string[] args)
        {
            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            ICreditManager vehicleCreditManager         = new VehicleCreditManager();
            ICreditManager mortgageCreditManager        = new MortgageCreditManager();
            ICreditManager artisanCreditManager         = new ArtisanCreditManager();
            ILoggerService smsLoggerService             = new SmsLoggerService();
            ILoggerService databaseLoggerService        = new DatabaseLoggerService();
            ILoggerService fileLoggerService            = new FileLoggerService();

            ApplicationManager applicationManager = new ApplicationManager();

            applicationManager.MakeAnApplication(vehicleCreditManager, fileLoggerService);
            Console.WriteLine("-----------------");
            applicationManager.MakeAnApplication(mortgageCreditManager, databaseLoggerService);
            Console.WriteLine("-----------------");
            applicationManager.MakeAnApplication(personalFinanceCreditManager, fileLoggerService);
            Console.WriteLine("-----------------");
            applicationManager.MakeAnApplication(artisanCreditManager, smsLoggerService);

            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personalFinanceCreditManager, vehicleCreditManager
            };
            //applicationManager.MakeCreditPreInformation(credits);
        }
        static void Main(string[] args)
        {
            PersonalFinanceCreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            TransportCreditManager       transportCreditManager       = new TransportCreditManager();
            MortgageLoanManager          mortgageLoanManager          = new MortgageLoanManager();


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


            ApplicationManager applicationManager = new ApplicationManager();

            applicationManager.MakeAnApplication(personalFinanceCreditManager, new List <ILoggerService>()
            {
                fileLoggerService, databseLoggerService
            });



            List <ICreditManager> credits = new List <ICreditManager>()
            {
                transportCreditManager, mortgageLoanManager
            };

            applicationManager.MakeCreditPreNotification(credits);
        }
Example #7
0
        static void Main(string[] args)
        {
            ICreditManager vehicleCreditManager = new VehicleCreditManager();

            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();

            ApplyManager applyManager = new ApplyManager();
            //applyManager.ToApply(personalFinanceCreditManager);
            //applyManager.ToApply(vehicleCreditManager);

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

            applyManager.ToApply(personalFinanceCreditManager, new List <ILoggerService> {
                databaseLoggerService
            });
            applyManager.ToApply(vehicleCreditManager, new List <ILoggerService> {
                databaseLoggerService, fileLoggerService
            });

            List <ICreditManager> credits = new List <ICreditManager> {
                vehicleCreditManager, personalFinanceCreditManager
            };
            //applyManager.CreditPreInformation(credits);
        }
Example #8
0
        static void Main(string[] args)
        {
            ICreditManager vehicleCreditManager = new VehicleCreditManager();
            //creditManager1.Calculate();

            ICreditManager housingLoanManager = new HousingLoanManager();
            //creditManager2.Calculate();

            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            //creditManager3.Calculate();


            ApplicationManager applicationManager = new ApplicationManager();

            applicationManager.ToApply(vehicleCreditManager, new DatabaseLoggerService());
            //applicationManager.ToApply(creditManager2);
            //applicationManager.ToApply(creditManager3);

            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personalFinanceCreditManager,
                vehicleCreditManager,
            };

            //applicationManager.CreditPriorInformationDo(credits);

            Console.ReadLine();
        }
Example #9
0
        static void Main(string[] args)
        {
            ICreditManager personalFinanceCredit = new PersonalFinanceCreditManager();
            ICreditManager vehicleCreditManager  = new VehicleCreditManager();
            ICreditManager housingCreditManager  = new HousingCreditManager();

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

            List <ILoggerService> loggers = new List <ILoggerService>()
            {
                databaseLoggerService, fileLoggerService, new SmsLoggerService()
            };

            ReferenceManager referenceManager = new ReferenceManager();

            referenceManager.MakeReference(new ArtisanCreditManager(), loggers);


            List <ICreditManager> credits = new List <ICreditManager>()
            {
                vehicleCreditManager, personalFinanceCredit
            };
            //referenceManager.CreditPreInfo(credits);
        }
Example #10
0
        static void Main(string[] args)
        {
            //Interfaceler tuttukları classların referans numaralarını tutabilirler.

            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            ICreditManager transportCreditManager       = new TransportCreditManager();
            ICreditManager mortgageCreditManager        = new MortgageCreditManager();
            ICreditManager artisanCreditManager         = new ArtisanCreditManager();

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

            List <ILoggerService> loggerServices = new List <ILoggerService>()
            {
                new DatabaseLoggerService(), new FileLoggerService(), new SmsLoggerService()
            };


            ApplicationManager applicationManager = new ApplicationManager();

            applicationManager.Application(artisanCreditManager, loggerServices);

            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personalFinanceCreditManager, transportCreditManager
            };


            //applicationManager.CreditPreInformation(credits);
        }
Example #11
0
        static void Main(string[] args)
        {
            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            //personalFinanceCreditManager.Calculate();

            ICreditManager transportCreditManager = new TransportCreditManager();
            //transportCreditManager.Calculate();

            ICreditManager mortgageManager = new MortgageManager();
            //mortgageManager.Calculate();

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

            ApplicationManager applicationManager = new ApplicationManager();

            //applicationManager.Application(personalFinanceCreditManager);
            applicationManager.Application(transportCreditManager, fileLoggerService);
            applicationManager.Application(mortgageManager, databaseLoggerService);

            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personalFinanceCreditManager, transportCreditManager, mortgageManager
            };
            //applicationManager.CreditInfo(credits);
        }
Example #12
0
        static void Main(string[] args)
        {
            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            ICreditManager transportCreditManager       = new TransportCreditManager();
            ICreditManager mortgageLoanManager          = new MortgageLoanManager();

            ILoggerService databaseLoggerService = new DatabaseLoggerService(); // *1*
            ILoggerService fileLoggerService     = new FileLoggerService();
            ILoggerService smsLoggerService      = new SmsLoggerService();

            AppealManager appealManager = new AppealManager();

            List <ILoggerService> loggers = new List <ILoggerService>()
            {
                databaseLoggerService, smsLoggerService
            };

            appealManager.MakeApp(mortgageLoanManager, loggers);
            //appealManager.MakeApp(mortgageLoanManager, new DatabaseLoggerService()); bu şekildede yapılabilir *1* işaret, olan satır kullanılmadan

            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personalFinanceCreditManager, transportCreditManager
            };
            //appealManager.CreditPriorKnowledge(credits);
        }
Example #13
0
        static void Main(string[] args)
        {
            ICreditManager personelCreditManager  = new PersonalFinanceCreditManager();
            ICreditManager transportCreditManager = new TransportCreditManager();
            ICreditManager mortgageLoanManager    = new MortgageLoanManager();


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

            List <ILoggerService> loggers = new List <ILoggerService> {
                new SmsLoggerService(), new FileLoggerService()
            };

            ApplicationManager applicationManager = new ApplicationManager();

            //applicationManager.MakeAnApplication(personelCreditManager, fileLoggerService);
            applicationManager.MakeAnApplication(new ArtisanLoanManager(), loggers);

            //applicationManager.MakeAnApplication(personelCreditManager, databaseLoggerService);
            //applicationManager.MakeAnApplication(mortgageLoanManager);
            //applicationManager.MakeAnApplication(transportCreditManager);

            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personelCreditManager, transportCreditManager
            };
            // applicationManager.CreditPreNotification(credits);
        }
Example #14
0
        static void Main(string[] args)
        {
            ICreditManager ihtiyacKrediManager = new PersonalFinanceCreditManager();
            ICreditManager tasitKrediManager   = new CarLoanManager();
            ICreditManager konutKrediManager   = new KonutKrediManager();

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

            List <ILoggerService> loggers = new List <ILoggerService> {
                new SmsLoggerService(), new FileLoggerService()
            };


            BasvuruManager basvuruManager = new BasvuruManager();

            basvuruManager.BasvuruYap(new EsnafKredisiManager(), loggers);

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

            //basvuruManager.KrediOnBilgilendirmesiYap(krediler);
        }
Example #15
0
        static void Main(string[] args)
        {
            //PersonalFinanceCreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            //personalFinanceCreditManager.Calculate();

            //VehicleCreditManager vehicleCreditManager = new VehicleCreditManager();
            //vehicleCreditManager.Calculate();

            //HousingCreditManager housingCreditManager = new HousingCreditManager();
            //housingCreditManager.Calculate();

            //Reference type
            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            ICreditManager vehicleCreditManager         = new VehicleCreditManager();
            ICreditManager housingCreditManager         = new HousingCreditManager();

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

            //List<ILoggerService> loggers = new List<ILoggerService> { new SmsLoggerService(), new FileLoggerService() };
            List <ILoggerService> loggers = new List <ILoggerService> {
                databaseLoggerService, fileLoggerService
            };

            ReferenceManager referenceManager = new ReferenceManager();

            //alternatif kullanım
            //referenceManager.Apply(vehicleCreditManager, new DatabaseLoggerService());

            referenceManager.Apply(housingCreditManager, loggers);
            Console.WriteLine("*******************");
            referenceManager.Apply(new TradesCreditManager(), new List <ILoggerService> {
                new DatabaseLoggerService(), new SmsLoggerService()
            });
            Console.WriteLine("*******************");
            referenceManager.Apply(new VehicleCreditManager(), loggers);


            Console.WriteLine("\nÖn Bilgilendirme.\n");
            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personalFinanceCreditManager, vehicleCreditManager, housingCreditManager
            };

            referenceManager.KrediOnBilgilendirmesiYap(credits);


            Console.ReadKey();
        }
Example #16
0
        static void Main(string[] args)
        {
            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();//Interfaceler de base class gibi kendini implemente eden
            //(uygulayan) class in referans no sunu tutabilirler. //Burada PersonalFinanceCreditManager yerine
            //ICreditManager yazdıgımızda kod aynı sekilde hatasız calısır. Bunun sebebi ICreditManager in PersonalFinanceCreditManager in referans no sunu
            //tutabilmesinden dolayıdır.
            ICreditManager vehicleCreditManager = new VehicleCreditManager();
            ICreditManager housingCreditManager = new HousingCreditManager();
            //Ustteki 3 new leme komutunu kullanıcı ekranındaki kredi secme sayfası olarak dusunuyoruz.

            ILoggerService        databaseLoggerService = new DatabaseLoggerService();
            ILoggerService        fileLoggerService     = new FileLoggerService();
            List <ILoggerService> loggers = new List <ILoggerService> {
                new DatabaseLoggerService(), new FileLoggerService()
            };


            ApplicationManager applicationManager = new ApplicationManager();

            applicationManager.MakeAnApplication(vehicleCreditManager, loggers);

            //Ustteki sekilde yeni bir satirda newlemek yerine asagidaki gibi methodu kullanırken icine de newleyebilirdik.
            //applicationManager.MakeAnApplication(vehicleCreditManager, new List<ILoggerService> {new DatabaseLoggerService(), new FileLoggerService() });

            //applicationManager.MakeAnApplication(personalFinanceCreditManager,new DatabaseLoggerService());
            //Burada "ApplicationManager applicationManager = new ApplicationManager();" yazmak yerine bir ustteki satırda yazılmıs oldugu gibi method
            //kullanırken de new leme yapabiliriz( new DatabaseLoggerService() ).


            //Burada parantez icini yazmadan once altı kırmızı olan "MakeAnApplication" e gelinip ardından solda ve
            //ya "MakeAnApplication" ın altında cıkacak olan cıkacak olan altında kırmızı carpi bulunan sarı ampul simgesine gelindiginde parantez icine
            //ICredit Manager degisken tipinde bir degisken girmemiz gerektigini belirttigini goruruz fakat burada new lenemeyeceginden oturu ICreditManager
            //tipinde bir degisken kullanamayız. Bunun yerine ICreditManager i inherit alan yani ICredit Manager in referans no sunu tutabildigi
            //"PersonalFinanceCreditManager", "VehicleCreditManager veya "HousingCreditManager" class ina ait bir degisken kullanırız. Aslinda bunu bu sekil
            //de yapabildigimizi"applicationManager.MakeAnApplication(" yazdıktan sonra yazabilecegimiz secenekleri gosteren ekrandan da gorebiliriz. Burada
            //3 class tan hangisini kullanacagımızı gercek hayatta kullanıcı belirtecektir.

            //applicationManager.MakeAnApplication(personalFinanceCreditManager); satirindaki method degisken tipi olarak ICreditManager interface ini kullandı
            //gından oturu kendisini inherit eden 3 kredi class ini da bu method da sorunsuzca kullanabilmis olduk.


            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personalFinanceCreditManager, vehicleCreditManager
            };
            //applicationManager.MakeAnCreditPreliminaryInformation(credits);
        }
Example #17
0
        static void Main(string[] args)
        {
            PersonalFinanceCreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            TransportCreditManager       transporterCreditManager     = new TransportCreditManager();
            MortageManager     mortageManager     = new MortageManager();
            ApplicationManager applicationManager = new ApplicationManager();

            ILoggerService fileLogerService = new FileLoggerService();

            applicationManager.Apply(mortageManager, new DataBaseLoggerService());

            List <ICreditManager> credits = new List <ICreditManager>()
            {
                mortageManager, personalFinanceCreditManager
            };
            //applicationManager.KrediOnBilgilendirmesiYap(credits);
        }
Example #18
0
        static void Main(string[] args)
        {
            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            ICreditManager vehicleCreditManager         = new VehicleCreditManager();
            ICreditManager mortgageCreditManager        = new MortgageCreditManager();

            ApplicationManager applicationManager = new ApplicationManager();

            //applicationManager.MakeApplication(mortgageCreditManager);
            Console.WriteLine("Hello World!");

            List <ICreditManager> credits = new List <ICreditManager> {
                personalFinanceCreditManager
            };


            applicationManager.MakeCreditPreInformation(credits);
        }
Example #19
0
        static void Main(string[] args)
        {
            ICreditManager ihtiyacKrediManager = new PersonalFinanceCreditManager();
            ICreditManager tasitKrediManager   = new VehicleCreditManager();
            ICreditManager konutKrediManager   = new HousingCreditManager();

            RecourseManager recourseManager = new RecourseManager();

            recourseManager.Recource(tasitKrediManager, new FileLoggerManager());

            IList <ICreditManager> creditManagers = new List <ICreditManager>()
            {
                ihtiyacKrediManager,
                konutKrediManager
            };

            recourseManager.MakeCreditPreNotification(creditManagers);
        }
Example #20
0
        static void Main(string[] args)
        {
            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();

            ICreditManager vehicleLoanManager = new VehicleLoanManager();

            ICreditManager mortgageLoanManager = new MortgageLoanManager();



            LoanApplication application = new LoanApplication();

            application.Application(vehicleLoanManager, new DataBaseLoggerService());

            List <ICreditManager> credits = new List <ICreditManager> {
                mortgageLoanManager, vehicleLoanManager
            };

            //application.CreditInformation(credits);
        }
Example #21
0
        static void Main(string[] args)
        {
            ICreditBaseManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            ICreditBaseManager vehicleCredıtManager         = new VehicleCredıtManager();
            ICreditBaseManager mortgageCreditManager        = new MortgageCreditManager();

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

            AppealManager appealManager = new AppealManager();

            appealManager.Appeal(personalFinanceCreditManager, fileLoggerService);

            List <ICreditBaseManager> credits = new List <ICreditBaseManager>()
            {
                personalFinanceCreditManager, vehicleCredıtManager
            };

            //appealManager.CreditInformation(credits);
        }
Example #22
0
        static void Main(string[] args)
        {
            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            ICreditManager vehicleCreditManager         = new VehicleCreditManager();
            ICreditManager mortgageCreditManager        = new MortgageCreditManager();

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


            ApplicationManager applicationManager = new ApplicationManager();

            applicationManager.DoApplication(new ArtisanCredit(), new SmsLoggerService());

            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personalFinanceCreditManager, vehicleCreditManager
            };

            //applicationManager.DoCreditPreNotification(credits);
        }
Example #23
0
        static void Main(string[] args)
        {
            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            ICreditManager transportCreditManager       = new TransportCreditManager();
            ICreditManager housingLoanManager           = new HousingLoanManager();

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

            AppealManager appealManager = new AppealManager();

            appealManager.MakeAnApplication(personalFinanceCreditManager, databaseLoggerService);



            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personalFinanceCreditManager, transportCreditManager
            };
            //appealManager.Creditİnformation(credits);
        }
Example #24
0
        static void Main(string[] args)
        {
            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            ICreditManager transportCreditManager       = new TransportCreditManager();
            ICreditManager mortgageCreditManager        = new MortgageCreditManager();

            ILoggerService dataBaseLoggerService = new DatabaseLoggerService();
            ILoggerService fileLogerService      = new FileLoggerService();

            ApplicationManager applicationManager = new ApplicationManager();

            applicationManager.Apply(new TradesmanCreditManager(), new List <ILoggerService> {
                new DatabaseLoggerService(), new SmsLoggerService()
            });

            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personalFinanceCreditManager, transportCreditManager
            };

            //applicationManager.GiveCreditPreliminaryInformation(credits);
        }
Example #25
0
        static void Main(string[] args)
        {
            ICreditManager pFCManager      = new PersonalFinanceCreditManager();
            ICreditManager vehicleManager  = new VehicleCreditManager();
            ICreditManager mortgageManager = new MortgageCreditManager();

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

            ApplicationManager applicationManager = new ApplicationManager();

            applicationManager.MakeApplication(pFCManager, new List <ILoggerService> {
                new DatabaseLoggerService(), new FileLoggerService()
            });                                                                                                                                //parantez içinde de newleyebilirsin önceden yazmana alternatif olarak.

            List <ICreditManager> credits = new List <ICreditManager>()
            {
                pFCManager, vehicleManager
            };

            //applicationManager.MakeCreditPreInfo(credits);
        }
Example #26
0
        static void Main(string[] args)
        {
            //PersonalFinanceCreditManager personalFinanceCreditManager1 = new PersonalFinanceCreditManager();
            //personalFinanceCreditManager1.Calculate();

            //TransportCreditManager transportCreditManager1 = new TransportCreditManager();
            //transportCreditManager1.Calculate();

            //MortgageLoanManager mortgageLoanManager1 = new MortgageLoanManager();
            //mortgageLoanManager1.Calculate();

            ///////////////////////////////////////////////////////////////////////////////////////////////////////

            ILoanManager personalFinanceCreditManager2 = new PersonalFinanceCreditManager();
            ILoanManager transportCreditManager2       = new TransportCreditManager();
            ILoanManager mortgageLoanManager2          = new MortgageLoanManager();

            AppealManager  appealManager         = new AppealManager();
            ILoggerService databaseLoggerService = new DatabaseLoggerService();
            ILoggerService fileLoggerService     = new FileLoggerService();
            ILoggerService smsLoggerService      = new SmsLoggerService();

            List <ILoggerService> loggers = new List <ILoggerService> {
                new SmsLoggerService(), new FileLoggerService()
            };

            appealManager.DoAppeal(mortgageLoanManager2, loggers);
            //appealManager.DoAppeal(new ArtisanLoanManager(), new List<ILoggerService> { databaseLoggerService, smsLoggerService });

            // Polymorphism

            List <ILoanManager> loans = new List <ILoanManager>()
            {
                personalFinanceCreditManager2, transportCreditManager2
            };

            //appealManager.DoCreditPreliminaryInformation(loans);
        }
Example #27
0
        static void Main(string[] args)
        {
            // interface ile implementasyon yaptığım için istediğim krediyiaşağıda kullanabilirim.
            // sen bir kredimanagersın demek bu ve diğerlerinin yerine kredi managerı kullanabilrim.
            //kafa karışıklığını ve ekstra isimleri kullanmaya gerek kalmaz.

            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();


            ICreditManager vehicleCreditManager = new VehicleCreditManager();


            ICreditManager mortgageCreditManager = new MortgageCreditManager();

            ILoggerService        databaseLoggerService = new DataBaseLoggerService();
            ILoggerService        fileLoggerService     = new FileLoggerService();
            ILoggerService        smsLoggerService      = new SmsLoggerService();
            List <ILoggerService> loggers = new List <ILoggerService>()
            {
                fileLoggerService,
                databaseLoggerService, smsLoggerService
            };


            ApplicationManager applicationManager = new ApplicationManager();

            applicationManager.DoApplication(new EsnafCreditManager(),
                                             loggers);


            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personalFinanceCreditManager,
                vehicleCreditManager
            };

            applicationManager.DoCreditInformation(credits);
        }
Example #28
0
        static void Main(string[] args)
        {
            IBankCreditManager carCreditManager             = new CarCreditManager();
            IBankCreditManager houseCreditManager           = new HouseCreditManager();
            IBankCreditManager personelFinanceCreditManager = new PersonalFinanceCreditManager();
            ILoggerService     databaseLoggerService        = new DatabaseLoggerService();
            ILoggerService     fileLoggerService            = new FileLoggerService();
            ILoggerService     smsLoggerService             = new SmsLoggerService();

            List <ILoggerService> loggers = new List <ILoggerService>()
            {
                databaseLoggerService, fileLoggerService, smsLoggerService
            };

            CreditApplicationManager creditApplicationManager = new CreditApplicationManager();

            creditApplicationManager.CreditApplication(personelFinanceCreditManager, loggers);

            List <IBankCreditManager> bankCreditManagers = new List <IBankCreditManager>()
            {
                personelFinanceCreditManager, carCreditManager, houseCreditManager
            };
            //creditApplicationManager.GetCreditInformation(bankCreditManagers);
        }
Example #29
0
        static void Main(string[] args)
        {
            ICreditManager personalFinanceCreditManager = new PersonalFinanceCreditManager();
            //personalFinanceCreditManager.Calculate();

            ICreditManager transportCreditManager = new TransportCreditManager();
            //transportCreditManager.Calculate();

            ICreditManager mortgageCreditManager = new MortgageCreditManager();
            //mortgageCreditManager.Calculate();

            ILoggerServices databaseLoggerServices = new DatabaseLoggerServices();
            ILoggerServices fileLoggerServices     = new FileLoggerServices();

            AplicationManager aplicationManager = new AplicationManager();

            aplicationManager.DoAplication(new ArtisanCreditManager(), new SmsLoggerServices());

            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personalFinanceCreditManager, transportCreditManager
            };
            //aplicationManager.MakeCreditPreliminaryInformation(credits);
        }
Example #30
0
        static void Main(string[] args)
        {//interface, onu implemente eden classın referansını tutabilir
            ICreditManager personalFinance = new PersonalFinanceCreditManager();
            ICreditManager vehicle         = new VehicleLoanManager();
            ICreditManager realEstate      = new RealEstateLoansManager();

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

            ApplicationManager applicationManager = new ApplicationManager();


            applicationManager.Applicate(new ArtisanCreditManager(), new List <ILoggerService> {
                databaseLoggerService, new SmsLoggerService()
            });
            //applicationManager.Applicate(realEstate);
            //applicationManager.Applicate(vehicle);

            List <ICreditManager> credits = new List <ICreditManager>()
            {
                personalFinance, vehicle
            };
            // applicationManager.CreditPreInforming(credits);
        }