public static void Serialize(object obj, string nameFile) { var keyLock = nameFile.ToLower(); try { var nTry = 0; var nTryError = 0; do { nTry = nTryError; var stream = new System.IO.IsolatedStorage.IsolatedStorageFileStream(nameFile, System.IO.FileMode.Create, System.IO.FileAccess.Write); try { var xml = new System.Xml.Serialization.XmlSerializer(obj.GetType()); xml.Serialize(stream, obj); } catch (Exception ex) { System.Diagnostics.Debug.Print(ex.Message); System.Diagnostics.Debugger.Break(); nTryError += 1; System.Threading.Tasks.Task.Delay(500); } finally { stream?.Dispose(); } } while (!(nTry == nTryError || nTryError > (5000 / 500))); } catch (Exception ex) { throw ex; } }
public static T LoadProperties() { //IPersistProperties retVal = null; // = new IPersistProperties(); object retVal = null; try { using (System.IO.IsolatedStorage.IsolatedStorageFileStream isfs = new System.IO.IsolatedStorage.IsolatedStorageFileStream(IsoFileName, System.IO.FileMode.OpenOrCreate)) { if (isfs.Length > 0) { //if you get deserialization / xml errors - the following can be helpful //StreamReader sr = new StreamReader(isfs); //string output = sr.ReadToEnd(); isfs.Position = 0; System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(T)); retVal = (T)xs.Deserialize(isfs); } } } catch (Exception ex) { //TODO: dont catch } return((T)retVal); }
/// <summary> /// Reads FileList.txt and makes a list of all files in the directory. /// </summary> /// <returns>A list of all the files in the directory, Without .txt extension</returns> public static List<String> getFileList() { System.IO.IsolatedStorage.IsolatedStorageFile local = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication(); List<String> files = new List<String>(); if (!local.DirectoryExists("DataFolder")) local.CreateDirectory("DataFolder"); // Specify the file path and options. using (var isoFileStream = new System.IO.IsolatedStorage.IsolatedStorageFileStream ("DataFolder\\FileList.txt", System.IO.FileMode.OpenOrCreate, local)) { // Read the data. using (var isoFileReader = new System.IO.StreamReader(isoFileStream)) { while (!isoFileReader.EndOfStream) { files.Add(isoFileReader.ReadLine()); } } } if (files.Count <= 0) { return new List<string>(); } return files; }
protected virtual void ReadFromIsolatedStorage(string fileName) { using (System.IO.IsolatedStorage.IsolatedStorageFile l_Storage = GetStorage()) { System.IO.IsolatedStorage.IsolatedStorageFileStream l_File = null; try { l_File = new System.IO.IsolatedStorage.IsolatedStorageFileStream(fileName, System.IO.FileMode.Open, System.IO.FileAccess.Read, l_Storage); } catch (System.IO.FileNotFoundException) { l_File = null; } if (l_File == null) //file non esiste { } else //file esiste { try { ReadFromStream(l_File); } finally { l_File.Close(); } } l_Storage.Close(); } }
private static void TimeTracker_LoadAccounts() { dctAccounts = new Dictionary <string, TimeTrackerAuthentication>(); System.IO.IsolatedStorage.IsolatedStorageFile isoStore; isoStore = System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(System.IO.IsolatedStorage.IsolatedStorageScope.User | System.IO.IsolatedStorage.IsolatedStorageScope.Assembly, null, null); System.IO.IsolatedStorage.IsolatedStorageFileStream fsSFS; if (!isoStore.FileExists("settings.txt")) { return; } fsSFS = new System.IO.IsolatedStorage.IsolatedStorageFileStream("settings.txt", System.IO.FileMode.Open, isoStore); System.IO.StreamReader srSFS = new System.IO.StreamReader(fsSFS); String strFile = srSFS.ReadToEnd(); String[] arrLines = strFile.Split(new char[] { '\r', '\n' }); foreach (String strLine in arrLines) { if (strLine.Trim().Length == 0) { continue; } String[] arrAccount = strLine.Split('|'); TimeTrackerAuthentication auth = new TimeTrackerAuthentication(); auth.EmailAddress = arrAccount[1]; auth.Token = arrAccount[2]; dctAccounts.Add(arrAccount[0], auth); } srSFS.Close(); srSFS.Dispose(); srSFS = null; fsSFS.Close(); fsSFS.Dispose(); fsSFS = null; }
private void WriteToFile(string content, string filename) { try { // Get the local folder. System.IO.IsolatedStorage.IsolatedStorageFile local = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication(); // Create a new folder named DataFolder. if (!local.DirectoryExists("DataFolder")) { local.CreateDirectory("DataFolder"); } // Create a new file named DataFile.txt. using (var isoFileStream = new System.IO.IsolatedStorage.IsolatedStorageFileStream( "DataFolder\\" + filename, System.IO.FileMode.Create, local)) { // Write the data from the textbox. using (var isoFileWriter = new System.IO.StreamWriter(isoFileStream)) { isoFileWriter.WriteLine(content); } } } catch { } }
private string ReadFile(string filename) { try { // Obtain a virtual store for the application. System.IO.IsolatedStorage.IsolatedStorageFile local = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication(); if (local.FileExists("DataFolder\\" + filename)) { // Specify the file path and options. using (var isoFileStream = new System.IO.IsolatedStorage.IsolatedStorageFileStream ("DataFolder\\" + filename, System.IO.FileMode.Open, local)) { // Read the data. using (var isoFileReader = new System.IO.StreamReader(isoFileStream)) { return(isoFileReader.ReadLine()); } } } else { return(null); } } catch { return(null); } }
public void SaveSettings() { System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(T)); using (System.IO.IsolatedStorage.IsolatedStorageFileStream isfs = new System.IO.IsolatedStorage.IsolatedStorageFileStream(IsoFileName, System.IO.FileMode.Truncate)) { xs.Serialize(isfs, this); } }
protected override void OnSave(System.IO.IsolatedStorage.IsolatedStorageFileStream p_File) { base.OnSave(p_File); IO.StreamPersistence.Write(p_File, m_Location.X); IO.StreamPersistence.Write(p_File, m_Location.Y); IO.StreamPersistence.Write(p_File, m_Size.Width); IO.StreamPersistence.Write(p_File, m_Size.Height); IO.StreamPersistence.Write(p_File, (int)m_WindowState); }
public override bool Obtain() { try { _file = _dir.CreateFile(_name); return true; } catch { return false; } }
protected override void OnLoad(System.IO.IsolatedStorage.IsolatedStorageFileStream p_File) { string l_Check = StreamPersistence.ReadString(p_File, System.Text.Encoding.UTF8); if (l_Check != c_Check) { throw new DevAge.IO.InvalidDataException(); } int l_CurrentVersion = StreamPersistence.ReadInt32(p_File); OnLoad(p_File, l_CurrentVersion); }
public void Save(string file, System.IO.MemoryStream contents) { using (System.IO.IsolatedStorage.IsolatedStorageFile isoStorage = GetISOStorage()) { using (var writer = new System.IO.IsolatedStorage.IsolatedStorageFileStream(file, System.IO.FileMode.Create, isoStorage)) { if (contents.CanSeek && contents.Position > 0) contents.Seek(0, SeekOrigin.Begin); byte[] data = contents.ToArray(); writer.Write(data, 0, data.Length); writer.Close(); } } }
void PhotoTask_Completed(object sender, PhotoResult e) { if (e.TaskResult == TaskResult.OK && e.ChosenPhoto != null) { System.Windows.Media.Imaging.WriteableBitmap bmp = Microsoft.Phone.PictureDecoder.DecodeJpeg(e.ChosenPhoto); System.IO.IsolatedStorage.IsolatedStorageFile isf = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication(); if (isf.FileExists("back_temp.jpg")) { isf.DeleteFile("back_temp.jpg"); } System.IO.IsolatedStorage.IsolatedStorageFileStream PhotoStream = isf.CreateFile("back_temp.jpg"); System.Windows.Media.Imaging.Extensions.SaveJpeg(bmp, PhotoStream, 1024, 768, 0, 100); //这里设置保存后图片的大小、品质 PhotoStream.Close(); //写入完毕,关闭文件流 } }
public static object Deserialize(string NameFile, Type Type = null) { object Obj = null; if (System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication().FileExists(NameFile)) { ; } { string KeyLock = NameFile.ToLower(); Exception Er = default(Exception); try { int NTry = 0; int NTryError = 0; do { NTry = NTryError; System.IO.Stream Stream = new System.IO.IsolatedStorage.IsolatedStorageFileStream(NameFile, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Inheritable); try { System.Xml.Serialization.XmlSerializer XML = new System.Xml.Serialization.XmlSerializer(Type); Obj = XML.Deserialize(Stream); Er = null; } catch (Exception ex) { Er = ex; NTryError += 1; System.Threading.Tasks.Task.Delay(500); } finally { if (Stream != null) { Stream.Dispose(); } } } while (!(NTry == NTryError || NTryError > (5000 / 500))); } catch (Exception ex) { throw ex; } } return(Obj); }
protected virtual void WriteToIsolatedStorage(string fileName, PersistenceFlags flags) { using (System.IO.IsolatedStorage.IsolatedStorageFile l_Storage = GetStorage()) { System.IO.IsolatedStorage.IsolatedStorageFileStream l_File = null; l_File = new System.IO.IsolatedStorage.IsolatedStorageFileStream(fileName, System.IO.FileMode.Create, System.IO.FileAccess.Write, l_Storage); try { WriteToStream(l_File, flags); } finally { l_File.Close(); } l_Storage.Close(); } }
protected virtual void WriteToIsolatedStorage(string fileName, PersistenceFlags flags) { using (System.IO.IsolatedStorage.IsolatedStorageFile l_Storage = GetStorage()) { System.IO.IsolatedStorage.IsolatedStorageFileStream l_File = null; l_File = new System.IO.IsolatedStorage.IsolatedStorageFileStream(fileName, System.IO.FileMode.Create, System.IO.FileAccess.Write, l_Storage); try { WriteToStream(l_File, flags); } finally { l_File.Close(); } l_Storage.Close(); } }
public static object Deserialize(string nameFile, Type type = null) { if (!System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication().FileExists(nameFile)) { return(null); } object obj = null; var keyLock = nameFile.ToLower(); var er = default(Exception); try { var nTry = 0; var nTryError = 0; do { nTry = nTryError; System.IO.Stream stream = new System.IO.IsolatedStorage.IsolatedStorageFileStream(nameFile, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Inheritable); try { var xml = new System.Xml.Serialization.XmlSerializer(type); obj = xml.Deserialize(stream); er = null; } catch (Exception ex) { er = ex; nTryError += 1; System.Threading.Tasks.Task.Delay(500); } finally { stream?.Dispose(); } } while (!(nTry == nTryError || nTryError > (5000 / 500))); } catch (Exception ex) { throw ex; } return(obj); }
public void SaveIndex() { System.IO.IsolatedStorage.IsolatedStorageFile local = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication(); if (!local.DirectoryExists("IndicesFolder")) { local.CreateDirectory("IndicesFolder"); } using (var isoFileStream = new System.IO.IsolatedStorage.IsolatedStorageFileStream("IndicesFolder\\Index.txt", System.IO.FileMode.OpenOrCreate, local)) { using (var isoFileWriter = new System.IO.StreamWriter(isoFileStream)) { foreach (var card in Index) { var cardAsString = string.Format("[[{0}]] {1} {2}{3}", card.Key.Trim("\n".ToCharArray()), card.Value.StartsAtByte, card.Value.Length, Environment.NewLine); isoFileWriter.WriteLine(cardAsString); } } } }
public System.IO.MemoryStream Load(string file) { using (System.IO.IsolatedStorage.IsolatedStorageFile isoStorage = GetISOStorage()) { string[] storeNames = isoStorage.GetFileNames(file); if (storeNames == null || storeNames.Length == 0) return null; else { byte[] contents; using (var reader = new System.IO.IsolatedStorage.IsolatedStorageFileStream(file, System.IO.FileMode.Open, isoStorage)) { contents = new byte[reader.Length]; reader.Read(contents, 0, (int)reader.Length); } return new System.IO.MemoryStream(contents); } } }
private static void TimeTracker_SaveAccounts() { System.IO.IsolatedStorage.IsolatedStorageFile isoStore; isoStore = System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(System.IO.IsolatedStorage.IsolatedStorageScope.User | System.IO.IsolatedStorage.IsolatedStorageScope.Assembly, null, null); System.IO.IsolatedStorage.IsolatedStorageFileStream fsSFS; fsSFS = new System.IO.IsolatedStorage.IsolatedStorageFileStream("settings.txt", System.IO.FileMode.Create, isoStore); System.IO.StreamWriter swSFS = new System.IO.StreamWriter(fsSFS); foreach (String strAccount in dctAccounts.Keys) { TimeTrackerAuthentication auth; auth = dctAccounts[strAccount]; swSFS.WriteLine(strAccount + "|" + auth.EmailAddress + "|" + auth.Token); } swSFS.Flush(); swSFS.Close(); swSFS.Dispose(); swSFS = null; fsSFS.Close(); fsSFS.Dispose(); fsSFS = null; }
public bool LoadIndex() { System.IO.IsolatedStorage.IsolatedStorageFile local = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication(); var newIndex = new Dictionary <string, FileTextBlock>(); if (!local.FileExists("IndicesFolder\\Index.txt")) { return(false); } using (var isoFileStream = new System.IO.IsolatedStorage.IsolatedStorageFileStream("IndicesFolder\\Index.txt", System.IO.FileMode.Open, local)) { using (var isoFileReader = new System.IO.StreamReader(isoFileStream)) { var line = isoFileReader.ReadLine(); while (!isoFileReader.EndOfStream) { if (!string.IsNullOrEmpty(line)) { var firstSpace = line.IndexOf(" ", line.IndexOf("]]")); if (firstSpace > 0) { var secondSpace = line.IndexOf(" ", firstSpace + 1); var wordKey = line.Substring(2, line.IndexOf("]]") - 2); var startsAt = long.Parse(line.Substring(firstSpace + 1, secondSpace - firstSpace).Trim(' ')); var length = int.Parse(line.Substring(secondSpace + 1).Trim(' ')); newIndex.Add(wordKey, new FileTextBlock() { Length = length, StartsAtByte = startsAt }); } } line = isoFileReader.ReadLine(); } } } Index = newIndex; return(true); }
protected override void OnLoad(System.IO.IsolatedStorage.IsolatedStorageFileStream p_File, int p_CurrentVersion) { if (p_CurrentVersion == Version) { int x, y, w, h, state; x = IO.StreamPersistence.ReadInt32(p_File); y = IO.StreamPersistence.ReadInt32(p_File); w = IO.StreamPersistence.ReadInt32(p_File); h = IO.StreamPersistence.ReadInt32(p_File); state = IO.StreamPersistence.ReadInt32(p_File); m_Location.X = x; m_Location.Y = y; m_Size.Width = w; m_Size.Height = h; m_WindowState = (FormWindowState)state; } else { throw new DevAge.IO.InvalidDataException(); } }
/// <summary> /// String + FilePath -> WriteFile /// </summary> /// <param name="thisStr"></param> /// <param name="thisFilePath"></param> /// <returns></returns> public static bool WriteFile(this string thisStr, string thisFilePath) { #region String + FilePath -> WriteFile try { using (var myIsolatedStorage = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication()) { using (var myIsolatedStorageFileStream = new System.IO.IsolatedStorage.IsolatedStorageFileStream(thisFilePath, System.IO.FileMode.Create, System.IO.FileAccess.Write, myIsolatedStorage)) { using (var writer = new System.IO.StreamWriter(myIsolatedStorageFileStream)) { writer.Write(thisStr); return(true); } } } } catch { return(false); } #endregion }
public static void Serialize(object Obj, string NameFile) { string KeyLock = NameFile.ToLower(); Exception Er = null; try { int NTry = 0; int NTryError = 0; do { NTry = NTryError; var Stream = new System.IO.IsolatedStorage.IsolatedStorageFileStream(NameFile, System.IO.FileMode.Create, System.IO.FileAccess.Write); try { System.Xml.Serialization.XmlSerializer xml = new System.Xml.Serialization.XmlSerializer(Obj.GetType()); xml.Serialize(Stream, Obj); } catch (Exception ex) { NTryError += 1; System.Threading.Tasks.Task.Delay(500); } finally { if (Stream != null) { Stream.Dispose(); } } } while (!(NTry == NTryError || NTryError > (5000 / 500))); } catch (Exception ex) { throw ex; } }
protected override void OnSave(System.IO.IsolatedStorage.IsolatedStorageFileStream p_File) { StreamPersistence.Write(p_File, c_Check, System.Text.Encoding.UTF8); StreamPersistence.Write(p_File, Version); //custom values }
/// <summary> /// Loads a previously recorded file given the location of the file. /// Note that front and back of cards are split using a pipe '|' /// </summary> /// <param name="url">The name of the file NOT including .txt extension</param> public static void loadOld(String url) { System.IO.IsolatedStorage.IsolatedStorageFile local = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication(); fronts = new List<String>(); backs = new List<String>(); // Specify the file path and options. using (var isoFileStream = new System.IO.IsolatedStorage.IsolatedStorageFileStream ("DataFolder\\" + url + ".txt", System.IO.FileMode.Open, local)) { // Read the data. using (var isoFileReader = new System.IO.StreamReader(isoFileStream)) { while (!isoFileReader.EndOfStream) { String input = isoFileReader.ReadLine(); String[] inputs = input.Split('|'); fronts.Add(inputs[0]); backs.Add(inputs[1]); } } } title = url; }
public void SaveStream(System.IO.IsolatedStorage.IsolatedStorageFileStream targetStream) { WriteApp1(true); file.Save(targetStream); }
override protected FileStream TakeFileStream(string filePath, FileMode mode, FileAccess access) { var fileStream = new System.IO.IsolatedStorage.IsolatedStorageFileStream(filePath, mode, access, StorageFile); return(fileStream); }
/// <summary> /// String + FilePath -> WriteFile /// </summary> /// <param name="thisStr"></param> /// <param name="thisFilePath"></param> /// <returns></returns> public static bool WriteFile(this string thisStr, string thisFilePath) { #region String + FilePath -> WriteFile try { using (var myIsolatedStorage = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication()) { using (var myIsolatedStorageFileStream = new System.IO.IsolatedStorage.IsolatedStorageFileStream(thisFilePath, System.IO.FileMode.Create, System.IO.FileAccess.Write, myIsolatedStorage)) { using (var writer = new System.IO.StreamWriter(myIsolatedStorageFileStream)) { writer.Write(thisStr); return true; } } } } catch { return false; } #endregion }
protected virtual void ReadFromIsolatedStorage(string fileName) { using (System.IO.IsolatedStorage.IsolatedStorageFile l_Storage = GetStorage()) { System.IO.IsolatedStorage.IsolatedStorageFileStream l_File = null; try { l_File = new System.IO.IsolatedStorage.IsolatedStorageFileStream(fileName, System.IO.FileMode.Open, System.IO.FileAccess.Read, l_Storage); } catch(System.IO.FileNotFoundException) { l_File = null; } if (l_File == null) //file non esiste { } else //file esiste { try { ReadFromStream(l_File); } finally { l_File.Close(); } } l_Storage.Close(); } }
/// <summary> /// Appends the specified text to the file at the specified path. /// </summary> /// <param name="filename">A <see cref="String"/> representing the path of the file.</param> /// <param name="value">A <see cref="String"/> representing the text to append.</param> protected virtual void AppendText(string filename, string value) { lock (PadLock) { #if NETFX_CORE var folderTask = Windows.Storage.StorageFolder.GetFolderFromPathAsync(Device.File.DirectoryName(filename)).AsTask(); folderTask.Wait(); var fileTask = folderTask.Result.CreateFileAsync(Path.GetFileName(filename), Windows.Storage.CreationCollisionOption.OpenIfExists).AsTask(); fileTask.Wait(); Windows.Storage.FileIO.AppendTextAsync(fileTask.Result, value + Environment.NewLine).AsTask().Wait(); #elif SILVERLIGHT var store = ((FileSystem.SLFile)Device.File)._store; if (value.Length > store.AvailableFreeSpace && !((FileSystem.SLFile)Device.File).IncreaseStorage(value.Length + (store.Quota - store.AvailableFreeSpace))) { return; } System.IO.IsolatedStorage.IsolatedStorageFileStream fileStream = null; try { fileStream = store.OpenFile(filename, FileMode.OpenOrCreate, FileAccess.ReadWrite); fileStream.Seek(0, SeekOrigin.End); using (var writer = new StreamWriter(fileStream, System.Text.Encoding.UTF8)) { writer.WriteLine(value); writer.Close(); } } finally { if (fileStream != null) { fileStream.Close(); fileStream.Dispose(); } } #else StreamWriter sw = null; try { FileStream fs = new FileStream(filename, FileMode.OpenOrCreate, FileAccess.ReadWrite); fs.Seek(0, SeekOrigin.End); sw = new StreamWriter(fs, Encoding.UTF8); sw.WriteLine(value); } catch (Exception) { //Swallow any errors here... If we tried logging our error, we might end up back here. } finally { if (sw != null) { try { sw.Close(); } catch { } } //if (fs != null) //{ // //fs.Close(); // fs.Dispose(); //} } #endif } }
/// <summary> /// Writes the content of the open flashcards to a file called name.txt /// </summary> /// <param name="name">The file name to use, will add a .txt to end of string</param> public static void saveCurrent(String name) { System.IO.IsolatedStorage.IsolatedStorageFile local = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication(); if (!local.DirectoryExists("DataFolder")) local.CreateDirectory("DataFolder"); using (var isoFileStream = new System.IO.IsolatedStorage.IsolatedStorageFileStream( "DataFolder\\" + name +".txt", System.IO.FileMode.Create, local)) { // Write the data from the textbox. using (var isoFileWriter = new System.IO.StreamWriter(isoFileStream)) { for (int i = 0; i < fronts.Count; i++) { isoFileWriter.WriteLine(fronts.ElementAt(i) + "|" + backs.ElementAt(i)); } updateFileList(name); } } title = name; }
public static void updateFileList(String name) { System.IO.IsolatedStorage.IsolatedStorageFile local = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication(); if (!local.DirectoryExists("DataFolder")) local.CreateDirectory("DataFolder"); String fileContents = ""; using (var isoFileStream = new System.IO.IsolatedStorage.IsolatedStorageFileStream( "DataFolder\\FileList.txt", System.IO.FileMode.OpenOrCreate, local)) { using (var isoFileReader = new System.IO.StreamReader(isoFileStream)) { fileContents = isoFileReader.ReadToEnd(); } } using (var isoFileStream = new System.IO.IsolatedStorage.IsolatedStorageFileStream( "DataFolder\\FileList.txt", System.IO.FileMode.Create, local)) { // Write the data from the textbox. using (var isoFileWriter = new System.IO.StreamWriter(isoFileStream)) { isoFileWriter.Write(fileContents + name + "\n"); } } }
/// <summary> /// Writes 3 fake test load files to file FileList.txt /// </summary> public static void updateFileList() { System.IO.IsolatedStorage.IsolatedStorageFile local = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication(); if (!local.DirectoryExists("DataFolder")) local.CreateDirectory("DataFolder"); using (var isoFileStream = new System.IO.IsolatedStorage.IsolatedStorageFileStream( "DataFolder\\FileList.txt", System.IO.FileMode.OpenOrCreate, local)) { using (var isoFileWriter = new System.IO.StreamWriter(isoFileStream)) { isoFileWriter.WriteLine("Test1"); isoFileWriter.WriteLine("Test2"); isoFileWriter.WriteLine("Test3"); } } }
protected abstract void OnLoad(System.IO.IsolatedStorage.IsolatedStorageFileStream p_File, int p_CurrentVersion);
static void Main(string[] args) { string tempPath = System.Environment.GetEnvironmentVariable("TEMP"); if (tempPath == null) { tempPath = System.Environment.GetEnvironmentVariable("TMP"); } if (tempPath == null) { tempPath = "..\\.."; } Exception exc = null; System.DateTime now = System.DateTime.Now; System.Security.Cryptography.X509Certificates.X509Certificate xc = null; System.IO.StreamWriter sw = null; System.IO.StreamReader sr = null; System.IO.DirectoryInfo di = null; bool b = false; System.DateTime dt = InicDateTime(); string[] sL = null; System.IO.FileInfo[] fiL = null; System.IO.DirectoryInfo[] diL = null; System.IO.FileSystemInfo[] fsiL = null; System.IO.FileStream fs = null; System.IO.FileInfo fi = null; System.IAsyncResult asr = null; int i = 0; long l = 0; string s = null; System.IO.IsolatedStorage.IsolatedStorageFile isf = null; System.IO.IsolatedStorage.IsolatedStorageFileStream isfs = null; byte[] bL = null; System.Diagnostics.Process p = null; System.IO.FileInfo fileInfo = new System.IO.FileInfo(tempPath + "\\resources18file.txt"); fileInfo.Create().Close(); System.IO.StreamWriter outFile = fileInfo.AppendText(); System.Console.WriteLine(tempPath + "\\resources18file.txt"); try { try { exc = null; di = null; now = System.DateTime.Now; di = System.IO.Directory.CreateDirectory(tempPath + "\\TestDir1\\"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine("Func: " + "System.IO.Directory.CreateDirectory(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + toString(di)); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; di = null; now = System.DateTime.Now; di = System.IO.Directory.GetParent(tempPath + "\\TestDir1\\"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath); outFile.WriteLine("Func: " + "System.IO.Directory.GetParent(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + toString(di)); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; now = System.DateTime.Now; b = System.IO.Directory.Exists(tempPath + "\\TestDir1\\"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine("Func: " + "System.IO.Directory.Exists(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + toString(b)); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.SetCreationTime(tempPath + "\\TestDir1\\", new System.DateTime(2003, 01, 01)); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine("Func: " + "System.IO.Directory.SetCreationTime(String, DateTime)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + ""); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; dt = InicDateTime(); now = System.DateTime.Now; dt = System.IO.Directory.GetCreationTime(tempPath + "\\TestDir1\\"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine("Func: " + "System.IO.Directory.GetCreationTime(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + toString(dt)); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.SetLastWriteTime(tempPath + "\\TestDir1\\", new System.DateTime(2003, 01, 01)); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine("Func: " + "System.IO.Directory.SetLastWriteTime(String, DateTime)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + ""); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; dt = InicDateTime(); now = System.DateTime.Now; dt = System.IO.Directory.GetLastWriteTime(tempPath + "\\TestDir1\\"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine("Func: " + "System.IO.Directory.GetLastWriteTime(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + toString(dt)); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.SetLastAccessTime(tempPath + "\\TestDir1\\", new System.DateTime(2003, 01, 01)); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine("Func: " + "System.IO.Directory.SetLastAccessTime(String, DateTime)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + ""); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; dt = InicDateTime(); now = System.DateTime.Now; dt = System.IO.Directory.GetLastAccessTime(tempPath + "\\TestDir1\\"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine("Func: " + "System.IO.Directory.GetLastAccessTime(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + toString(dt)); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; sL = null; now = System.DateTime.Now; sL = System.IO.Directory.GetFiles(tempPath + "\\TestDir1\\"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine("Func: " + "System.IO.Directory.GetFiles(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + toString(sL)); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; sL = null; now = System.DateTime.Now; sL = System.IO.Directory.GetDirectories(tempPath + "\\TestDir1\\"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine("Func: " + "System.IO.Directory.GetDirectories(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + toString(sL)); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.GetFileSystemEntries(tempPath + "\\TestDir1\\"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine("Func: " + "System.IO.Directory.GetFileSystemEntries(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + toString(sL)); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.SetCurrentDirectory(tempPath + "\\TestDir1\\"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath); outFile.WriteLine("Func: " + "System.IO.Directory.SetCurrentDirectory(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + ""); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.Move(tempPath + "\\TestDir1\\", tempPath + "\\TestDir2\\"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine("Func: " + "System.IO.Directory.Move(String, String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); //--- outFile.WriteLine("Name: " + tempPath + "\\TestDir2"); outFile.WriteLine("Func: " + "System.IO.Directory.Move(String, String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + ""); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.Delete(tempPath + "\\TestDir1\\"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine("Func: " + "System.IO.Directory.Delete(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + ""); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.Delete(tempPath + "\\TestDir2\\"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir2"); outFile.WriteLine("Func: " + "System.IO.Directory.Delete(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + ""); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } } catch (Exception) { } try { di = null; di = new System.IO.DirectoryInfo(tempPath); System.IO.DirectoryInfo di2 = null; try { try { exc = null; di2 = null; now = System.DateTime.Now; di2 = di.CreateSubdirectory(tempPath + "\\TestDir3\\"); di = di2; } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir3"); outFile.WriteLine("Func: " + "System.IO.DirectoryInfo.CreateSubdirectory(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + toString(di2)); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; fiL = null; now = System.DateTime.Now; fiL = di.GetFiles(); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir3"); outFile.WriteLine("Func: " + "System.IO.DirectoryInfo.GetFiles()"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + toString(fiL)); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; diL = null; now = System.DateTime.Now; diL = di.GetDirectories(); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir3"); outFile.WriteLine("Func: " + "System.IO.DirectoryInfo.GetDirectories()"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + toString(diL)); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; fsiL = null; now = System.DateTime.Now; fsiL = di.GetFileSystemInfos(); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir3"); outFile.WriteLine("Func: " + "System.IO.DirectoryInfo.GetFileSystemInfos()"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + toString(fsiL)); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; now = System.DateTime.Now; di.MoveTo(tempPath + "\\TestDir4\\"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir3"); outFile.WriteLine("Func: " + "System.IO.DirectoryInfo.MoveTo(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + ""); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); //--- outFile.WriteLine("Name: " + tempPath + "\\TestDir4"); outFile.WriteLine("Func: " + "System.IO.DirectoryInfo.MoveTo(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + ""); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } } finally { try { exc = null; char[] backSlash = new char[1]; backSlash[0] = '\\'; outFile.WriteLine("Name: " + di.FullName.TrimEnd(backSlash)); now = System.DateTime.Now; di.Delete(); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Func: " + "System.IO.DirectoryInfo.Delete()"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + ""); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } } try { di = null; di = new System.IO.DirectoryInfo(tempPath + "\\TestDir5\\"); try { exc = null; now = System.DateTime.Now; di.Create(); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir5"); outFile.WriteLine("Func: " + "System.IO.DirectoryInfo.Create()"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + ""); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } try { exc = null; now = System.DateTime.Now; di.MoveTo(tempPath + "\\TestDir6\\"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Name: " + tempPath + "\\TestDir5"); outFile.WriteLine("Func: " + "System.IO.DirectoryInfo.MoveTo(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + ""); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); //--- outFile.WriteLine("Name: " + tempPath + "\\TestDir6"); outFile.WriteLine("Func: " + "System.IO.DirectoryInfo.MoveTo(String)"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + ""); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } } catch (Exception) { } finally { try { exc = null; char[] backSlash = new char[1]; backSlash[0] = '\\'; outFile.WriteLine("Name: " + di.FullName.TrimEnd(backSlash)); now = System.DateTime.Now; di.Delete(); } catch (Exception e) { exc = e; } finally { outFile.WriteLine("Func: " + "System.IO.DirectoryInfo.Delete()"); outFile.WriteLine("Proc: " + System.Diagnostics.Process.GetCurrentProcess().Id); outFile.WriteLine("Time: " + GetTime(now)); outFile.WriteLine("Retv: " + ""); outFile.WriteLine("Errc: " + ""); outFile.WriteLine("Exce: " + GetException(exc)); } } } catch (Exception) { } outFile.Flush(); outFile.Close(); try { sL = System.IO.Directory.GetDirectories(tempPath, "TempDir*"); foreach (string str in sL) { try { System.IO.Directory.Delete(str); } catch (Exception) { } } } catch (Exception) { } } // Main
/// <summary> /// Deletes a file called url.txt. And removes it from FileList. /// </summary> /// <param name="url">Filename, automatically appends .txt</param> public static void removeFile(String url) { System.IO.IsolatedStorage.IsolatedStorageFile local = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication(); local.DeleteFile("DataFolder\\" + url + ".txt"); String fileContents = ""; using (var isoFileStream = new System.IO.IsolatedStorage.IsolatedStorageFileStream ("DataFolder\\FileList.txt", System.IO.FileMode.Open, local)) { // Read the data. using (var isoFileReader = new System.IO.StreamReader(isoFileStream)) { fileContents = isoFileReader.ReadToEnd(); } } local.DeleteFile("DataFolder\\FileList.txt"); List<string> fileLines = fileContents.Split('\n').ToList<string>(); fileLines.Remove(url); fileContents = ""; foreach (string s in fileLines) { if(!s.Equals("")) fileContents += s + '\n'; } using (var isoFileStream = new System.IO.IsolatedStorage.IsolatedStorageFileStream ("DataFolder\\FileList.txt", System.IO.FileMode.Create, local)) { // Read the data. using (var isoFileWriter = new System.IO.StreamWriter(isoFileStream)) { isoFileWriter.Write(fileContents); } } }
static void Main(string[] args) { string tempPath = System.Environment.GetEnvironmentVariable ("TEMP"); if (tempPath == null) { tempPath = System.Environment.GetEnvironmentVariable ("TMP"); } if (tempPath == null) { tempPath = "..\\.."; } Exception exc = null; System.DateTime now = System.DateTime.Now; System.Security.Cryptography.X509Certificates.X509Certificate xc = null; System.IO.StreamWriter sw = null; System.IO.StreamReader sr = null; System.IO.DirectoryInfo di = null; bool b = false; System.DateTime dt = InicDateTime (); string[] sL = null; System.IO.FileInfo[] fiL = null; System.IO.DirectoryInfo[] diL = null; System.IO.FileSystemInfo[] fsiL = null; System.IO.FileStream fs = null; System.IO.FileInfo fi = null; System.IAsyncResult asr = null; int i = 0; long l = 0; string s = null; System.IO.IsolatedStorage.IsolatedStorageFile isf = null; System.IO.IsolatedStorage.IsolatedStorageFileStream isfs = null; byte[] bL = null; System.Diagnostics.Process p = null; System.IO.FileInfo fileInfo = new System.IO.FileInfo (tempPath + "\\resources4file.txt"); fileInfo.Create ().Close (); System.IO.StreamWriter outFile = fileInfo.AppendText (); System.Console.WriteLine (tempPath + "\\resources4file.txt"); try { exc = null; xc = null; now = System.DateTime.Now; xc = System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromCertFile (tempPath + "\\dummyFile1.txt"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile1.txt"); outFile.WriteLine ("Func: " + "System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromCertFile(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (xc)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; xc = null; now = System.DateTime.Now; xc = System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromSignedFile (tempPath + "\\dummyFile2.txt"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile2.txt"); outFile.WriteLine ("Func: " + "System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromSignedFile(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (xc)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } /* try { System.IO.BinaryWriter.Write (); System.IO.BinaryWriter.Seek (); System.IO.BinaryWriter.Flush (); System.IO.BinaryWriter.Close (); System.IO.BinaryWriter bw = new System.IO.BinaryWriter (); } catch (Exception e) { } try { System.IO.BufferedStream.WriteByte (); System.IO.BufferedStream.Write (); System.IO.BufferedStream.ReadByte (); System.IO.BufferedStream.Read (); System.IO.BufferedStream.SetLength (); System.IO.BufferedStream.Seek (); System.IO.BufferedStream.EndWrite (); System.IO.BufferedStream.BeginWrite (); System.IO.BufferedStream.EndRead (); System.IO.BufferedStream.BeginRead (); System.IO.BufferedStream.Flush (); System.IO.BufferedStream.Close (); System.IO.BufferedStream bs = new System.IO.BufferedStream (); } catch (Exception e) { } */ try { exc = null; try { exc = null; sw = null; now = System.DateTime.Now; sw = new System.IO.StreamWriter (tempPath + "\\dummyFile3.txt"); outFile.WriteLine ("Name: " + tempPath + "\\dummyFile3.txt"); outFile.WriteLine ("Func: " + "System.IO.StreamWriter.ctor(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (sw)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); try { exc = null; System.Console.SetOut (sw); try { exc = null; now = System.DateTime.Now; System.Console.WriteLine (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile3.txt"); outFile.WriteLine ("Func: " + "System.Console.WriteLine()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; System.Console.Out.Write ("hello"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile3.txt"); outFile.WriteLine ("Func: " + "System.IO.TextWriter.Write(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } finally { try { sw.Close (); } catch (Exception) { } } } catch (Exception) { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile3.txt"); outFile.WriteLine ("Func: " + "System.IO.StreamWriter.ctor(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (sw)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; sr = null; now = System.DateTime.Now; sr = new System.IO.StreamReader (tempPath + "\\dummyFile4.txt"); outFile.WriteLine ("Name: " + tempPath + "\\dummyFile4.txt"); outFile.WriteLine ("Func: " + "System.IO.StreamReader.ctor(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (sr)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); try { System.Console.SetIn (sr); try { exc = null; now = System.DateTime.Now; System.Console.ReadLine (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile4.txt"); outFile.WriteLine ("Func: " + "System.Console.ReadLine()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; System.Console.In.ReadLine (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile4.txt"); outFile.WriteLine ("Func: " + "System.IO.TextReader.ReadLine()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception) { } finally { try { sr.Close (); } catch (Exception) { } } } catch (Exception e) { exc = e; outFile.WriteLine ("Name: " + tempPath + "\\dummyFile4.txt"); outFile.WriteLine ("Func: " + "System.IO.StreamReader.ctor(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (sr)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; sw = null; now = System.DateTime.Now; sw = new System.IO.StreamWriter (tempPath + "\\dummyFile5.txt"); outFile.WriteLine ("Name: " + tempPath + "\\dummyFile.txt"); outFile.WriteLine ("Func: " + "System.IO.StreamWriter.ctor(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (sw)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); try { System.Console.SetError (sw); try { exc = null; now = System.DateTime.Now; System.Console.Error.WriteLine (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile5.txt"); outFile.WriteLine ("Func: " + "System.IO.TextWriter.WriteLine(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } finally { try { sw.Close (); } catch (Exception) { } } } catch (Exception e) { exc = e; outFile.WriteLine ("Name: " + tempPath + "\\dummyFile5.txt"); outFile.WriteLine ("Func: " + "System.IO.StreamWriter.ctor(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (sw)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception) { } try { try { exc = null; di = null; now = System.DateTime.Now; di = System.IO.Directory.CreateDirectory (tempPath + "\\TestDir1"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine ("Func: " + "System.IO.Directory.CreateDirectory(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (di)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; di = null; now = System.DateTime.Now; di = System.IO.Directory.GetParent (tempPath + "\\TestDir1"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath); outFile.WriteLine ("Func: " + "System.IO.Directory.GetParent(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (di)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; b = System.IO.Directory.Exists (tempPath + "\\TestDir1"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine ("Func: " + "System.IO.Directory.Exists(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (b)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.SetCreationTime (tempPath + "\\TestDir1", new System.DateTime (2003, 01, 01)); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine ("Func: " + "System.IO.Directory.SetCreationTime(String, DateTime)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; dt = InicDateTime (); now = System.DateTime.Now; dt = System.IO.Directory.GetCreationTime (tempPath + "\\TestDir1"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine ("Func: " + "System.IO.Directory.GetCreationTime(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (dt)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.SetLastWriteTime (tempPath + "\\TestDir1", new System.DateTime (2003, 01, 01)); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine ("Func: " + "System.IO.Directory.SetLastWriteTime(String, DateTime)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; dt = InicDateTime (); now = System.DateTime.Now; dt = System.IO.Directory.GetLastWriteTime (tempPath + "\\TestDir1"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine ("Func: " + "System.IO.Directory.GetLastWriteTime(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (dt)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.SetLastAccessTime (tempPath + "\\TestDir1", new System.DateTime (2003, 01, 01)); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine ("Func: " + "System.IO.Directory.SetLastAccessTime(String, DateTime)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; dt = InicDateTime (); now = System.DateTime.Now; dt = System.IO.Directory.GetLastAccessTime (tempPath + "\\TestDir1"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine ("Func: " + "System.IO.Directory.GetLastAccessTime(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (dt)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; sL = null; now = System.DateTime.Now; sL = System.IO.Directory.GetFiles (tempPath + "\\TestDir1"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine ("Func: " + "System.IO.Directory.GetFiles(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (sL)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; sL = null; now = System.DateTime.Now; sL = System.IO.Directory.GetDirectories (tempPath + "\\TestDir1"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine ("Func: " + "System.IO.Directory.GetDirectories(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (sL)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.GetFileSystemEntries (tempPath + "\\TestDir1"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine ("Func: " + "System.IO.Directory.GetFileSystemEntries(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (sL)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.SetCurrentDirectory (tempPath + "\\TestDir1\\.."); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath); outFile.WriteLine ("Func: " + "System.IO.Directory.SetCurrentDirectory(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.Move (tempPath + "\\TestDir1", tempPath + "\\TestDir2"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine ("Func: " + "System.IO.Directory.Move(String, String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); //--- outFile.WriteLine ("Name: " + tempPath + "\\TestDir2"); outFile.WriteLine ("Func: " + "System.IO.Directory.Move(String, String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.Delete (tempPath + "\\TestDir1"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir1"); outFile.WriteLine ("Func: " + "System.IO.Directory.Delete(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; System.IO.Directory.Delete (tempPath + "\\TestDir2"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir2"); outFile.WriteLine ("Func: " + "System.IO.Directory.Delete(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception) { } try { di = null; di = new System.IO.DirectoryInfo (tempPath); System.IO.DirectoryInfo di2 = null; try { try { exc = null; di2 = null; now = System.DateTime.Now; di2 = di.CreateSubdirectory (tempPath + "\\TestDir3"); di = di2; } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir3"); outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.CreateSubdirectory(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (di2)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; fiL = null; now = System.DateTime.Now; fiL = di.GetFiles (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir3"); outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.GetFiles()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (fiL)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; diL = null; now = System.DateTime.Now; diL = di.GetDirectories (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir3"); outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.GetDirectories()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (diL)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; fsiL = null; now = System.DateTime.Now; fsiL = di.GetFileSystemInfos (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir3"); outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.GetFileSystemInfos()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (fsiL)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; di.MoveTo (tempPath + "\\TestDir4"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir3"); outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.MoveTo(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); //--- outFile.WriteLine ("Name: " + tempPath + "\\TestDir4"); outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.MoveTo(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } finally { try { exc = null; char[] backSlash = new char[1]; backSlash[0] = '\\'; outFile.WriteLine ("Name: " + di.FullName.TrimEnd (backSlash)); now = System.DateTime.Now; di.Delete (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.Delete()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } try { di = null; di = new System.IO.DirectoryInfo (tempPath + "\\TestDir5"); try { exc = null; now = System.DateTime.Now; di.Create (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir5"); outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.Create()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; di.MoveTo (tempPath + "\\TestDir6"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\TestDir5"); outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.MoveTo(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); //--- outFile.WriteLine ("Name: " + tempPath + "\\TestDir6"); outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.MoveTo(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception) { } finally { try { exc = null; char[] backSlash = new char[1]; backSlash[0] = '\\'; outFile.WriteLine ("Name: " + di.FullName.TrimEnd (backSlash)); now = System.DateTime.Now; di.Delete (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.Delete()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } } catch (Exception) { } try { try { exc = null; sr = null; now = System.DateTime.Now; sr = System.IO.File.OpenText (tempPath + "\\dummyFile6.txt"); sr.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile6.txt"); outFile.WriteLine ("Func: " + "System.IO.File.OpenText(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (sr)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; sw = null; now = System.DateTime.Now; sw = System.IO.File.CreateText (tempPath + "\\dummyFile7.txt"); sw.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile7.txt"); outFile.WriteLine ("Func: " + "System.IO.File.CreateText(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (sw)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; sw = null; now = System.DateTime.Now; sw = System.IO.File.AppendText (tempPath + "\\dummyFile8.txt"); sw.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile8.txt"); outFile.WriteLine ("Func: " + "System.IO.File.AppendText(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (sw)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; fs = null; now = System.DateTime.Now; fs = System.IO.File.Open (tempPath + "\\dummyFile9.txt", System.IO.FileMode.OpenOrCreate); fs.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt"); outFile.WriteLine ("Func: " + "System.IO.File.Open(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (fs)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; System.IO.File.SetCreationTime (tempPath + "\\dummyFile9.txt", new System.DateTime (2003, 01, 01)); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt"); outFile.WriteLine ("Func: " + "System.IO.File.SetCreationTime(String, DateTime)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; dt = InicDateTime (); now = System.DateTime.Now; dt = System.IO.File.GetCreationTime (tempPath + "\\dummyFile9.txt"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt"); outFile.WriteLine ("Func: " + "System.IO.File.GetCreationTime(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (dt)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; System.IO.File.SetLastAccessTime (tempPath + "\\dummyFile9.txt", new System.DateTime (2003, 01, 01)); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt"); outFile.WriteLine ("Func: " + "System.IO.File.SetLastAccessTime(String, DateTime)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; dt = System.IO.File.GetLastAccessTime (tempPath + "\\dummyFile9.txt"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt"); outFile.WriteLine ("Func: " + "System.IO.File.GetLastAccessTime(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (dt)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; System.IO.File.SetLastWriteTime (tempPath + "\\dummyFile9.txt", new System.DateTime (2003, 01, 01)); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt"); outFile.WriteLine ("Func: " + "System.IO.File.SetLastWriteTime(String, DateTime)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; dt = InicDateTime (); now = System.DateTime.Now; dt = System.IO.File.GetLastWriteTime (tempPath + "\\dummyFile9.txt"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt"); outFile.WriteLine ("Func: " + "System.IO.File.GetLastWriteTime(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (dt)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; fs = null; now = System.DateTime.Now; fs = System.IO.File.OpenRead (tempPath + "\\dummyFile10.txt"); fs.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile10.txt"); outFile.WriteLine ("Func: " + "System.IO.File.OpenRead(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (fs)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; fs = null; now = System.DateTime.Now; fs = System.IO.File.OpenWrite (tempPath + "\\dummyFile11.txt"); fs.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile11.txt"); outFile.WriteLine ("Func: " + "System.IO.File.OpenWrite(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (fs)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; fs = null; now = System.DateTime.Now; fs = System.IO.File.Create (tempPath + "\\testFile1.txt"); fs.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\testFile1.txt"); outFile.WriteLine ("Func: " + "System.IO.File.Create(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (fs)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; fs = null; now = System.DateTime.Now; System.IO.File.Move (tempPath + "\\testFile1.txt", tempPath + "\\testFile2.txt"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\testFile1.txt"); outFile.WriteLine ("Func: " + "System.IO.File.OpenWrite(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); //--- outFile.WriteLine ("Name: " + tempPath + "\\testFile2.txt"); outFile.WriteLine ("Func: " + "System.IO.File.OpenWrite(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; System.IO.File.Delete (tempPath + "\\testFile2.txt"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\testFile2.txt"); outFile.WriteLine ("Func: " + "System.IO.File.Delete(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; b = System.IO.File.Exists (tempPath + "\\testFile3.txt"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\testFile3.txt"); outFile.WriteLine ("Func: " + "System.IO.File.Exists(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (b)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception) { } try { fi = new System.IO.FileInfo (tempPath + "\\testFile4.txt"); try { exc = null; fs = null; now = System.DateTime.Now; fs = fi.Create (); fs.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\testFile4.txt"); outFile.WriteLine ("Func: " + "System.IO.FileInfo.Create()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (fs)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; sr = null; now = System.DateTime.Now; sr = fi.OpenText (); sr.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\testFile4.txt"); outFile.WriteLine ("Func: " + "System.IO.FileInfo.OpenText()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (sr)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; sw = null; now = System.DateTime.Now; sw = fi.CreateText (); sw.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\testFile4.txt"); outFile.WriteLine ("Func: " + "System.IO.FileInfo.CreateText()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (sw)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; sw = null; now = System.DateTime.Now; sw = fi.AppendText (); sw.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\testFile4.txt"); outFile.WriteLine ("Func: " + "System.IO.FileInfo.AppendText()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (sw)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; fs = null; fi = new System.IO.FileInfo (tempPath + "\\testFile5.txt"); now = System.DateTime.Now; fs = fi.Open (System.IO.FileMode.Open); fs.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\testFile5.txt"); outFile.WriteLine ("Func: " + "System.IO.FileInfo.Create(FileMode)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (fs)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; fs = null; now = System.DateTime.Now; fs = fi.OpenWrite (); fs.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\testFile5.txt"); outFile.WriteLine ("Func: " + "System.IO.FileInfo.OpenWrite()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (fs)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; fi.MoveTo (tempPath + "\\testFile6.txt"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\testFile5.txt"); outFile.WriteLine ("Func: " + "System.IO.FileInfo.MoveTo(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); //--- outFile.WriteLine ("Name: " + tempPath + "\\testFile6.txt"); outFile.WriteLine ("Func: " + "System.IO.FileInfo.MoveTo(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; char[] backSlash = new char[1]; backSlash[0] = '\\'; outFile.WriteLine ("Name: " + fi.FullName.TrimEnd (backSlash)); now = System.DateTime.Now; fi.Delete (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Func: " + "System.IO.FileInfo.Delete()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception) { } try { exc = null; byte[] array = new byte[1]; array[0] = 0; fs = null; now = System.DateTime.Now; fs = System.IO.File.Open (tempPath + "\\dummyFile12.txt", System.IO.FileMode.OpenOrCreate); outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.File.Open(String, FileMode)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (fs)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); try { exc = null; now = System.DateTime.Now; fs.Lock (0, 1); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.Lock(Int64, Int64)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; fs.Unlock (0, 1); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.Unlock(Int64, Int64)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; fs.WriteByte (0); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.WriteByte(Byte)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; fs.Write (array, 0, 1); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.Write(Byte[], Int32, Int32)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; asr = null; now = System.DateTime.Now; asr = fs.BeginWrite (array, 0, 1, null, null); outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (asr)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); try { exc = null; now = System.DateTime.Now; fs.EndWrite (asr); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.EndWrite(IAsyncResult)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception e) { exc = e; outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (asr)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; fs.SetLength (2); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.SetLength(Int64)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; fs.Flush (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.Flush()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; i = 0; now = System.DateTime.Now; i = fs.ReadByte (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.ReadByte()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (i)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; i = 0; now = System.DateTime.Now; i = fs.Read (array, 0, 1); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.Read(Byte[], Int32, Int32)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (i)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; l = 0; now = System.DateTime.Now; l = fs.Seek (0, System.IO.SeekOrigin.Begin); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.Seek(Int64, SeekOrigin)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (l)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; asr = null; now = System.DateTime.Now; asr = fs.BeginRead (array, 0, 1, null, null); outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (asr)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); try { exc = null; i = 0; now = System.DateTime.Now; i = fs.EndRead (asr); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.EndRead(IAsyncResult)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (i)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception e) { exc = e; outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (asr)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; fs.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.FileStream.Close(IAsyncResult)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception e) { exc = e; outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt"); outFile.WriteLine ("Func: " + "System.IO.File.Open(String, FileMode)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (fs)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { System.IO.TextWriter tw = new System.IO.StreamWriter (tempPath + "\\dummyFile13.txt"); try { exc = null; now = System.DateTime.Now; tw.WriteLine ("hello"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt"); outFile.WriteLine ("Func: " + "System.IO.TextWriter.WriteLine(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; tw.Write ("12345678790"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt"); outFile.WriteLine ("Func: " + "System.IO.TextWriter.Write(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; tw.Flush (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt"); outFile.WriteLine ("Func: " + "System.IO.TextWriter.Flush()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; tw.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt"); outFile.WriteLine ("Func: " + "System.IO.TextWriter.Close()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception) { } try { char[] array = new char[1]; array[0] = 'a'; System.IO.TextReader tr = new System.IO.StreamReader (tempPath + "\\dummyFile13.txt"); try { exc = null; s = null; now = System.DateTime.Now; s = tr.ReadLine (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt"); outFile.WriteLine ("Func: " + "System.IO.TextReader.ReadLine()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (s)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; i = 0; now = System.DateTime.Now; i = tr.ReadBlock (array, 0, 1); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt"); outFile.WriteLine ("Func: " + "System.IO.TextReader.ReadBlock(Char[], Int32, Int32)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (i)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; i = 0; now = System.DateTime.Now; i = tr.Read (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt"); outFile.WriteLine ("Func: " + "System.IO.TextReader.Read()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (i)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; i = 0; now = System.DateTime.Now; i = tr.Read (array, 0, 1); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt"); outFile.WriteLine ("Func: " + "System.IO.TextReader.Read(Char[], Int32, Int32)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (i)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; s = null; now = System.DateTime.Now; s = tr.ReadToEnd (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt"); outFile.WriteLine ("Func: " + "System.IO.TextReader.ReadToEnd()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (s)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; tr.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt"); outFile.WriteLine ("Func: " + "System.IO.TextReader.Close()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception) { } try { sw = new System.IO.StreamWriter (tempPath + "\\dummyFile14.txt"); try { exc = null; now = System.DateTime.Now; sw.Write (0); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile14.txt"); outFile.WriteLine ("Func: " + "System.IO.StreamWriter.Write(Int32)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; sw.Flush (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile14.txt"); outFile.WriteLine ("Func: " + "System.IO.StreamWriter.Flush()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; sw.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile14.txt"); outFile.WriteLine ("Func: " + "System.IO.StreamWriter.Close()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception) { } /* try { exc = null; System.IO.IsolatedStorage.IsolatedStorageScope iss = System.IO.IsolatedStorage.IsolatedStorageScope.User | System.IO.IsolatedStorage.IsolatedStorageScope.Assembly | System.IO.IsolatedStorage.IsolatedStorageScope.Domain; isf = null; now = System.DateTime.Now; isf = System.IO.IsolatedStorage.IsolatedStorageFile.GetStore (iss, null, null); try { exc = null; now = System.DateTime.Now; isf.Dispose (); } catch (Exception e) { exc = e; } // System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForDomain (); // System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForAssembly (); // System.IO.IsolatedStorage.IsolatedStorageFile.GetStore (System.IO.IsolatedStorage.IsolatedStorageScope.User | System.IO.IsolatedStorage.IsolatedStorageScope.Assembly | System.IO.IsolatedStorage.IsolatedStorageScope.Domain, null, null); try { exc = null; now = System.DateTime.Now; isf.CreateDirectory ("dummyDir"); } catch (Exception e) { exc = e; } try { exc = null; now = System.DateTime.Now; isf.GetDirectoryNames ("*"); } catch (Exception e) { exc = e; } try { exc = null; now = System.DateTime.Now; isf.DeleteFile ("dummyFile"); } catch (Exception e) { exc = e; } try { exc = null; now = System.DateTime.Now; isf.DeleteDirectory ("dummyDir"); } catch (Exception e) { exc = e; } try { exc = null; now = System.DateTime.Now; isf.GetFileNames ("*"); } catch (Exception e) { exc = e; } try { exc = null; now = System.DateTime.Now; isf.Close (); } catch (Exception e) { exc = e; } try { exc = null; now = System.DateTime.Now; System.IO.IsolatedStorage.IsolatedStorageFile.Remove (iss); } catch (Exception e) { exc = e; } } catch (Exception e) { exc = e; } */ try { exc = null; byte[] array = new byte[1]; array[0] = 0; isfs = null; now = System.DateTime.Now; isfs = new System.IO.IsolatedStorage.IsolatedStorageFileStream (tempPath + "\\dummyFile15.txt", System.IO.FileMode.OpenOrCreate); outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.ctor(String, FileMode)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (isfs)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); try { exc = null; now = System.DateTime.Now; isfs.Lock (0, 1); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Lock(Int64, Int64)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; isfs.Unlock (0, 1); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Unlock(Int64, Int64)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; isfs.WriteByte (0); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.WriteByte(Byte)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; isfs.Write (array, 0, 1); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Write(Byte[], Int32, Int32)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; asr = null; now = System.DateTime.Now; asr = isfs.BeginWrite (array, 0, 1, null, null); outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.BeginWrite(IAsyncResult, Int32, Int32, AsyncCallback, Object)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (asr)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); try { exc = null; now = System.DateTime.Now; isfs.EndWrite (asr); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.EndWrite(IAsyncResult)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception e) { exc = e; outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.BeginWrite(IAsyncResult, Int32, Int32, AsyncCallback, Object)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (asr)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; isfs.SetLength (2); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.SetLength(Int64)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; isfs.Flush (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Flush()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; l = 0; now = System.DateTime.Now; l = isfs.Seek (0, System.IO.SeekOrigin.Begin); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Seek(Int64, SeekOrigin)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (l)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; i = 0; now = System.DateTime.Now; i = isfs.ReadByte (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.ReadByte()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (i)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; i = 0; now = System.DateTime.Now; i = isfs.Read (array, 0, 1); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Read(Byte[], Int32, Int32)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (i)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; asr = null; now = System.DateTime.Now; asr = isfs.BeginRead (array, 0, 1, null, null); outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (asr)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); try { exc = null; i = 0; now = System.DateTime.Now; i = isfs.EndRead (asr); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.EndRead(IAsyncResult)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (i)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception e) { exc = e; outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (asr)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; now = System.DateTime.Now; isfs.Close (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Close()"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception e) { exc = e; outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt"); outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.ctor(String, FileMode)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (isfs)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { System.Net.WebClient wc = new System.Net.WebClient (); try { exc = null; now = System.DateTime.Now; wc.DownloadFile ("http://www.google.com", tempPath + "\\dummyFile16.txt"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile16.txt"); outFile.WriteLine ("Func: " + "System.Net.WebClient.DownloadFile(String, String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + ""); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; bL = null; now = System.DateTime.Now; bL = wc.UploadFile ("http://www.google.com", tempPath + "\\dummyFile16.txt"); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile16.txt"); outFile.WriteLine ("Func: " + "System.Net.WebClient.UploadFile(String, String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + toString (bL)); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception) { } try { string processString = null; try { exc = null; p = null; now = System.DateTime.Now; p = System.Diagnostics.Process.Start (tempPath + "\\dummyFile16.txt"); processString = toString (p); p.Kill (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile16.txt"); outFile.WriteLine ("Func: " + "System.Diagnostics.Process.Start(String)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + processString); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } try { exc = null; System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo (tempPath + "\\dummyFile16.txt"); p = null; now = System.DateTime.Now; p = System.Diagnostics.Process.Start (psi); processString = toString (p); p.Kill (); } catch (Exception e) { exc = e; } finally { outFile.WriteLine ("Name: " + tempPath + "\\dummyFile16.txt"); outFile.WriteLine ("Func: " + "System.Diagnostics.Process.Start(ProcessStartInfo)"); outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id); outFile.WriteLine ("Time: " + GetTime (now)); outFile.WriteLine ("Retv: " + processString); outFile.WriteLine ("Errc: " + ""); outFile.WriteLine ("Exce: " + GetException (exc)); } } catch (Exception) { } /* try { now = System.DateTime.Now; System.Configuration.AppSettingsReader asr = new System.Configuration.AppSettingsReader (); asr.GetValue ("key", System.Type.GetType ("System.Object", false)); } catch (Exception e) { } */ /* try { System.Xml.XmlDocument.Save (); System.Xml.XmlDocument.LoadXml (); System.Xml.XmlDocument.WriteContentTo (); System.Xml.XmlDocument.WriteTo (); System.Xml.XmlDocument xd = new System.Xml.XmlDocument (System.Xml.XmlNameTable); System.Xml.XmlDocumentFragment.WriteContentTo (); System.Xml.XmlDocumentFragment.WriteTo (); System.Xml.XmlDocumentType.WriteContentTo (); System.Xml.XmlDocumentType.WriteTo (); } catch (Exception e) { } try { System.Xml.XmlWriter.WriteNode (); System.Xml.XmlWriter.WriteAttributes (); System.Xml.XmlWriter.WriteStartElement (); System.Xml.XmlWriter.WriteAttributeString (); System.Xml.XmlWriter.WriteStartAttribute (); System.Xml.XmlWriter.WriteElementString (); } catch (Exception e) { } try { System.Xml.XmlTextWriter xtw = System.Xml.XmlTextWriter (tempPath + "\\dummyFile.txt", System.Text.Encoding.ASCII); xtw.WriteNode (); xtw.WriteAttributes (); xtw.WriteQualifiedName ("localName", ); xtw.WriteName (); xtw.WriteNmToken (); xtw.WriteBinHex (); xtw.WriteBase64 (); xtw.WriteRaw (); xtw.WriteChars (); xtw.WriteSurrogateCharEntity (); xtw.WriteString (); xtw.WriteWhitespace (); xtw.WriteCharEntity (); xtw.WriteEntityRef (); xtw.WriteProcessingInstruction (); xtw.WriteComment (); xtw.WriteCData (); xtw.WriteEndAttribute (); xtw.WriteStartAttribute (); xtw.WriteFullEndElement (); xtw.WriteEndElement (); xtw.WriteStartElement (); xtw.WriteDocType (); xtw.WriteEndDocument (); xtw.WriteStartDocument (); xtw.WriteAttributeString (); xtw.WriteElementString (); xtw.Flush (); xtw.Close (); } catch (Exception e) { } try { System.Xml.XmlReader.IsStartElement (); System.Xml.XmlReader.ReadEndElement (); System.Xml.XmlReader.ReadElementString (); System.Xml.XmlReader.ReadStartElement (); System.Xml.XmlReader.MoveToContent (); System.Xml.XmlReader.Skip (); System.Xml.XmlReader.IsName (); System.Xml.XmlReader.IsNameToken (); } catch (Exception e) { } try { System.Xml.XmlTextReader.ReadAttributeValue (); System.Xml.XmlTextReader.ResolveEntity (); System.Xml.XmlTextReader.LookupNamespace (); System.Xml.XmlTextReader.ReadOuterXml (); System.Xml.XmlTextReader.ReadInnerXml (); System.Xml.XmlTextReader.IsStartElement (); System.Xml.XmlTextReader.ReadEndElement (); System.Xml.XmlTextReader.ReadElementString (); System.Xml.XmlTextReader.ReadStartElement (); System.Xml.XmlTextReader.MoveToContent (); System.Xml.XmlTextReader.ReadString (); System.Xml.XmlTextReader.Skip (); System.Xml.XmlTextReader.Close (); System.Xml.XmlTextReader.Read (); System.Xml.XmlTextReader.MoveToElement (); System.Xml.XmlTextReader.MoveToNextAttribute (); System.Xml.XmlTextReader.MoveToFirstAttribute (); System.Xml.XmlTextReader.MoveToAttribute (); System.Xml.XmlTextReader.GetAttribute (); System.Xml.XmlTextReader.GetRemainder (); System.Xml.XmlTextReader.ReadChars (); System.Xml.XmlTextReader.ReadBase64 (); System.Xml.XmlTextReader.ReadBinHex (); System.Xml.XmlTextReader.ctor (); } catch (Exception e) { } try { System.Xml.XmlEntityReference.WriteContentTo (); System.Xml.XmlEntityReference.WriteTo (); System.Xml.XmlImplementation.CreateDocument (); System.Xml.XmlImplementation.ctor (); System.Xml.XmlText.WriteContentTo (); System.Xml.XmlText.WriteTo (); } catch (Exception e) { } */ outFile.Flush (); outFile.Close (); try { sL = System.IO.Directory.GetFiles (tempPath, "tempFile*.txt"); foreach (string str in sL) { try { System.IO.File.Delete (str); } catch (Exception) { } } sL = System.IO.Directory.GetFiles (tempPath, "dummyFile*.txt"); foreach (string str in sL) { try { System.IO.File.Delete (str); } catch (Exception) { } } sL = System.IO.Directory.GetDirectories (tempPath, "TempDir*"); foreach (string str in sL) { try { System.IO.Directory.Delete (str); } catch (Exception) { } } } catch (Exception) { } }