示例#1
0
        private void Reload()
        {
            CacheTextFileReaderModule fileReader = GetFileReader();
            String fileContent = fileReader.Read();

            RenderUI(fileContent, fileReader.Status);
        }
示例#2
0
        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);
        }