Example #1
0
 internal ObjectBuilder(bool isInitialization)
 {
     lock (lock_flag)
     {
         if (factory == null)
         {
             factory = new InternalObjectFactory();
             if (isInitialization)
             {
                 factory.InitializationFactory();
             }
         }
     }
 }
Example #2
0
 /// <summary>
 /// 重置IOC容器到初始状态
 /// </summary>
 public static void Reset()
 {
     _factory     = _cloneFactory;
     _logProvider = null;
 }
Example #3
0
 /// <summary>
 /// 设置当前IOC容器实例-替换默认的IOC容器
 /// </summary>
 /// <param name="objectBuilder"></param>
 public static void SetCurrent(ObjectBuilder objectBuilder)
 {
     _factory = objectBuilder.InternalObjectFactory;
 }