Ejemplo n.º 1
0
        public static SystemController GetInstance(IRefreshStrategy refreshStrategy = null)
        {
            if (instance == null)
            {
                instance = new SystemController(refreshStrategy);
            }

            return(instance);
        }
Ejemplo n.º 2
0
 private SystemController(IRefreshStrategy refreshStrategy)
 {
     if (refreshStrategy != null)
     {
         refreshMode = refreshStrategy;
     }
     else
     {
         refreshMode = new ManualRefresh();
     }
 }
Ejemplo n.º 3
0
 public void ChangeRefreshStrategy(IRefreshStrategy newStrategy)
 {
     refreshMode = newStrategy;
 }
Ejemplo n.º 4
0
 public SchedulerChecker(IRefreshStrategy strategy)
 {
     RefreshStrategy = strategy;
     m_Timer         = new Timer(notify, null, 5000, RefreshStrategy.AmoumtOfTime());
 }