Exemplo n.º 1
0
        static void Main(string[] args)
        {
            //interface lerin birbirlerinin alternatifi olan kod içeriklerinin farklı olan kod içerikleri için kullanırız.
            ICreditManager needLoanManager     = new NeedLoanManager();
            ICreditManager vehicleLoanManager  = new VehicleLoanManager();
            ICreditManager mortgageLoanManager = new MortgageLoanManager();
            ICreditManager artisanLoanManager  = new ArtisanLoanManager();

            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.MakeAnApplication(needLoanManager, loggers); //Hangi class ı gönderirsem onun methodu çalışır.
            applicationManager.MakeAnApplication(artisanLoanManager, loggers);

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

            //applicationManager.MakeCreditPreNotification(credits);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            ICreditManager needLoanManager        = new NeedLoanManager();
            ICreditManager transportCreditManager = new TransportCreditManager();
            ICreditManager mortgageLoanManager    = new MortgageLoanManager();

            ApplicationManager applicationManager = new ApplicationManager();

            applicationManager.MakeApplication(needLoanManager, new List <ILoggerService> {
                new DatabaseLoggerService(), new FileLoggerService()
            });

            List <ICreditManager> credits = new List <ICreditManager> {
                needLoanManager, transportCreditManager
            };

            //applicationManager.CreditPreliminaryInformation(credits);

            Console.ReadLine();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            ILoanManager needLoanManager     = new NeedLoanManager();
            ILoanManager vehicleLoanManager  = new VehicleLoanManager();
            ILoanManager mortgageLoanManager = new MortgageLoanManager();
            ILoanManager esnafLoanManager    = new EsnafLoanManager();

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

            ApplicationManager applicationManager = new ApplicationManager();

            applicationManager.ToApply(esnafLoanManager, smsLoggerService);
            //applicationManager.ToApply(needLoanManager);

            List <ILoanManager> loans = new List <ILoanManager>()
            {
                needLoanManager, vehicleLoanManager
            };

            //applicationManager.LoanInformation(loans);
        }