Пример #1
0
 public static Guid GetSystemSession()
 {
     if (_systemSessionId == Guid.Empty)
     {
         Development.Core.User.Interface.IUser user = new User.User();
         user.UserName                    = "******";
         _systemSessionId                 = Guid.NewGuid();// /* A generated session key */ 1;
         _sessions[_systemSessionId]      = new DevelopmentManager(_eventManager, _pluginManager);
         _sessions[_systemSessionId].User = user;
         return(_systemSessionId);
     }
     else
     {
         return(_systemSessionId);
     }
     throw new Exception("Invalid Opeartion");
 }
Пример #2
0
        /// <summary>
        /// Initialize Development Platform
        /// </summary>
        private static void Initialize()
        {
            Development.Core.Metadata.LogHandler.LogInfo("initialization block hit happen at" + DateTime.Now, Development.Core.Metadata.LogHandler.LogType.General);


            if (_isInitialized)
            {
                ShutDown();
            }

            // Initialize the event manager
            _eventManager = EventManager.Instance;
            _eventManager.Initialize();

            IDevelopmentManager initializingDevelopmentManager = new DevelopmentManager(_eventManager, null);

            // Initialize log4net
            log4net.Config.XmlConfigurator.Configure();

            // Initialize DataAccess Layer
            PersistenceManager.Instance.Initialize();
            _managers = new List <IManager>();
            // Create the managers (this could be done by configuration)

            _managers.Add(CommonManager.Instance);

            // Todo: add the rest of the managers

            // Initialize all managers
            foreach (IManager manager in _managers)
            {
                manager.Initialize(initializingDevelopmentManager);
            }

            GetSystemSession();
            _isInitialized = true;

            Development.Core.Metadata.LogHandler.LogInfo("initialization block hit done at" + DateTime.Now, Development.Core.Metadata.LogHandler.LogType.General);
        }
 public static Guid GetSystemSession()
 {
     if (_systemSessionId == Guid.Empty)
     {
         Development.Core.User.Interface.IUser user = new User.User();
         user.UserName = "******";
         _systemSessionId = Guid.NewGuid();// /* A generated session key */ 1;
         _sessions[_systemSessionId] = new DevelopmentManager(_eventManager, _pluginManager);
         _sessions[_systemSessionId].User = user;
         return _systemSessionId;
     }
     else
         return _systemSessionId;
     throw new Exception("Invalid Opeartion");
 }
        /// <summary>
        /// Initialize Development Platform
        /// </summary>
        private static void Initialize()
        {
            Development.Core.Metadata.LogHandler.LogInfo("initialization block hit happen at" + DateTime.Now, Development.Core.Metadata.LogHandler.LogType.General);

            if (_isInitialized)
                ShutDown();

            // Initialize the event manager
            _eventManager = EventManager.Instance;
            _eventManager.Initialize();

            IDevelopmentManager initializingDevelopmentManager = new DevelopmentManager(_eventManager, null);

            // Initialize log4net
            log4net.Config.XmlConfigurator.Configure();

            // Initialize DataAccess Layer
            PersistenceManager.Instance.Initialize();
            _managers = new List<IManager>();
            // Create the managers (this could be done by configuration)

            _managers.Add(CommonManager.Instance);

            // Todo: add the rest of the managers

            // Initialize all managers
            foreach (IManager manager in _managers)
            {
                manager.Initialize(initializingDevelopmentManager);
            }

            GetSystemSession();
            _isInitialized = true;

            Development.Core.Metadata.LogHandler.LogInfo("initialization block hit done at" + DateTime.Now, Development.Core.Metadata.LogHandler.LogType.General);
        }