Example #1
0
        public static SystemController GetInstance(IRefreshStrategy refreshStrategy = null)
        {
            if (instance == null)
            {
                instance = new SystemController(refreshStrategy);
            }

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