Ejemplo n.º 1
0
        public CDefaultAppImp()
        {
            m_timerManager       = CreateTimerManager();
            m_notificationCenter = CreateNotificationCenter();
            m_processor          = CreateCommandProcessor();

            m_updatables = new CUpdatableList(2);
            m_updatables.Add(m_timerManager);
        }
Ejemplo n.º 2
0
        //////////////////////////////////////////////////////////////////////////////

        #region Lifecycle

        public virtual void Start()
        {
            ResolveCommands();

            CTimerManager.ScheduleTimerOnce(delegate()
            {
                ExecStartupConfigs();
                RegisterCommandNotifications();
            });
        }
Ejemplo n.º 3
0
 private void Reset()
 {
     next         = prev = null;
     helpListNext = null;
     manager      = null;
     callback1    = null;
     callback2    = null;
     numRepeats   = numRepeated = 0;
     timeout      = 0;
     fireTime     = 0;
     scheduleTime = 0;
     cancelled    = false;
     name         = null;
     userData     = null;
 }
Ejemplo n.º 4
0
        private void Save(bool immediately)
        {
            if (m_path == null)
            {
                return;
            }

            if (immediately)
            {
                CTimerManager.CancelTimer(SaveDelayed);
                Save();
            }
            else
            {
                CTimerManager.ScheduleTimerOnce(SaveDelayed);
            }
        }
Ejemplo n.º 5
0
        //////////////////////////////////////////////////////////////////////////////

        #region Shared instance

        static CTimerManager()
        {
            s_sharedInstance = new CTimerManager();
        }
Ejemplo n.º 6
0
 public CObjectsPoolEntry AutoRecycle()
 {
     CTimerManager.ScheduleTimer(Recycle);
     return(this);
 }
 public CNotificationCenter(CTimerManager timerManager)
 {
     m_timerManager      = timerManager;
     m_registerMap       = new Dictionary <string, CNotificationDelegateList>();
     m_notificatoinsPool = new CObjectsPool <CNotification>();
 }