using Autofac;
using IoC.implement;
using IoC.inerface;
using IoC.services;

namespace IoC
{
    public class Container
    {
        /// <summary>
        /// 仲介公司
        /// </summary>
        /// <returns></returns>
        public static IContainer MiddleCompany()
        {
            ContainerBuilder builder = new ContainerBuilder();

            //在仲介公司裡寫需求人申請單
            builder.RegisterType<MineIOC>();
            //小明所需打掃阿姨需求
            builder.RegisterType<Aunt>().As<ISwapable>();

            return builder.Build();
        }

    }
}
