private void Reload() { CacheTextFileReaderModule fileReader = GetFileReader(); String fileContent = fileReader.Read(); RenderUI(fileContent, fileReader.Status); }
private void Button_Click(object sender, RoutedEventArgs e) { CacheTextFileReaderModule cacheModule = new CacheTextFileReaderModule(); cacheModule.Context.AbsoluteFilePath = System.AppDomain.CurrentDomain.BaseDirectory + "cacheText.txt"; cacheModule.Context.ExparationInSeconds = 30; String fileContent = cacheModule.Read(); if (cacheModule.Status == CacheTextFileReaderStatus.FileFromCache) { MessageBox.Show("Read from cache"); } MessageBox.Show(fileContent); }