Beispiel #1
0
        static void Main(string[] args)
        {
            ICreditManager consumerCreditManager = new ConsumerCreditManager();
            ICreditManager vehicleCreditManager  = new VehicleCreditManager();
            ICreditManager dwellingCreditManager = new DwellingCreditManager();

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

            ApplicationManager applicationManager = new ApplicationManager();

            applicationManager.Apply(vehicleCreditManager, new FileLoggerService());//(a type of ICreditManager)



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

            //applicationManager.ProvideCreditInformation(credits);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            /*(ICreditManager)*/
            RequirementCreditManager requirementCreditManager = new RequirementCreditManager();
            ICreditManager           dwellingCreditManager    = new DwellingCreditManager();
            ICreditManager           vehicleCreditManager     = new VehicleCreditManager();

            /* if you write;
             * ILoggerService databaseLoggerService = new DatabaseLoggerService();
             * ILoggerService fileLoggerService = new FileLoggerService();
             * instead of ....,new DatabaseLoggerService -> (databaseLoggerService)*/

            RequestManager requestManager = new RequestManager();

            //new List<ILoggerService> { new DatabaseLoggerService(), new FileLoggerService()}
            requestManager.Request(vehicleCreditManager, new DatabaseLoggerService());

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

            //requestManager.CreditPreinforming(credits);
        }