Esempio n. 1
0
        static IocObject()
        {
            ObjectFactory.Configure(o =>
            {
                o.For<DbGenerator>().Singleton().Use(new DbGenerator());
                o.For<IDataLogic>().Singleton().Use<DataLogic>();
            }
                );

            Data = ObjectFactory.GetInstance<IDataLogic>();
            _dao = ObjectFactory.GetInstance<DbGenerator>();
        }
Esempio n. 2
0
 public WeixinResLogic(DbGenerator dao)
 {
     this._dao = dao;
 }