public void ForceRefresh() { lock (_lock) { _instance = new RallyBackgroundData(_dbContext); _instance.LoadAll(); } }
public static void AutoRefresh(Object stateInfo) { while (true) { lock (_lock) { if (DateTime.Now - LastUpdatedTime >= TimeSpan.FromSeconds(20)) { RallyBackgroundData newData = new RallyBackgroundData(_dbContext); newData.LoadAll(); lock (_lock) { _instance = newData; } } } Thread.Sleep(TimeSpan.FromSeconds(20)); } }
public AzureService(RallyBackgroundData backgroundData) { _rallyBackgroundData = backgroundData; }