示例#1
0
        //
        public static LibBeline InitializeInstance(BEnumSystem aSystem, string aProjectName)
        {
            try
              {
            if (singletonInstance == null)
            {
              singletonInstance = new LibBeline(aSystem, aProjectName);

              if (aSystem == BEnumSystem.master)
              { // only master module manager can make instances of module manager and config manager
            singletonInstance.configManager = BConfigManager.GetInstance();
            singletonInstance.moduleManager = BModuleManager.GetInstance();
            BMasterServiceManager.GetInstance();
              }
              else
              { // only slave can make slave's service manager instance
            singletonInstance.configManager = BConfigManager.GetInstance();
            BSlaveServiceManager.InitializeInstance(aProjectName);
              }
            }
              }
              catch (Exception e)
              {
            if (singletonInstance != null)
              singletonInstance.LogManager.Log(e);

            throw;
              }

              return singletonInstance;
        }
示例#2
0
 //
 private LibBeline(BEnumSystem aSystem, string aProjectName)
 {
     projectName = aProjectName;
       system = aSystem;
       logManager = BLogManagerFactory.CreateLogManager();
 }