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