using Autofac;
using IoC.services;
using System;

namespace IoC
{
    class Program
    {
        static void Main(string[] args)
        {
            // 沒有注入的
            Mine mine = new Mine();
            mine.Room();

            //========================


            // 有注入的
            IContainer middleCompany = Container.MiddleCompany();

            //仲介公司(IOC AutoFac)自動幫小明注入一個打掃阿姨
            MineIOC mineWithMiddle = middleCompany.Resolve<MineIOC>();

            mineWithMiddle.Room();

            Console.ReadKey();
        }

    }
}
