/// <summary>
 /// 获取实体工厂的实例
 /// </summary>
 /// <returns></returns>
 public static IEntityFactory GetEntityFactory()
 {
     if (meh == null)
     {
         meh = new MachineEntityHandler();
     }
     return(meh.EntityFactory);
 }
Exemple #2
0
        /// <summary>
        /// 创建日志记录器
        /// </summary>
        /// <returns></returns>
        protected static ILogger CreateLogger()
        {
            ProteinConfig pconfig      = ProteinConfig.GetInstance();
            string        aname        = pconfig.DAlEntityConfig.AssemblyName;
            string        assemblyfile = aname.ExtComposeAssemblyFullName();

            Design.ClassDrive cd     = new Design.ClassDrive();
            ILogger           logger = cd.Instance <ILogger>(assemblyfile, pconfig.DAlEntityConfig.ProteinLog);// LoggerManager.CreateLogger(assemblyfile, pconfig.DAlEntityConfig.ProteinLog);

            logger.EntityFactory = MachineEntityHandler.GetEntityFactory();
            return(logger);
        }