예제 #1
0
 public void ForceRefresh()
 {
     lock (_lock)
     {
         _instance = new RallyBackgroundData(_dbContext);
         _instance.LoadAll();
     }
 }
예제 #2
0
        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));
            }
        }
예제 #3
0
 public AzureService(RallyBackgroundData backgroundData)
 {
     _rallyBackgroundData = backgroundData;
 }