Пример #1
0
        public override void DoWork()
        {
            try
            {
                string str = CachingProvider.Instance().PurgeCache();

                ScheduleHistoryItem.Succeeded = true; //REQUIRED
                ScheduleHistoryItem.AddLogNote(str);
            }
            catch (Exception exc)                      //REQUIRED
            {
                ScheduleHistoryItem.Succeeded = false; //REQUIRED

                ScheduleHistoryItem.AddLogNote(string.Format("Purging cache task failed: {0}.", exc.ToString()));

                //notification that we have errored
                Errored(ref exc); //REQUIRED

                //log the exception
                Exceptions.Exceptions.LogException(exc); //OPTIONAL
            }
        }
Пример #2
0
 // dynamically create provider
 private static void CreateProvider()
 {
     objProvider = (CachingProvider)Reflection.CreateObjectNotCached( "caching" );
 }
Пример #3
0
 // dynamically create provider
 private static void CreateProvider()
 {
     objProvider = (CachingProvider)Reflection.CreateObjectNotCached("caching");
 }