public string GetFileWithData() { if (File.Exists(_OutputFilePath)) { File.Delete(_OutputFilePath); } if (_TraceList.Count == 0) { return(null); } try { string traceOutput = Serialize.SerializeObject(this, typeof(TraceLogger)); System.IO.FileStream fs = new System.IO.FileStream(_OutputFilePath, FileMode.OpenOrCreate | System.IO.FileMode.Append, System.IO.FileAccess.Write); System.IO.StreamWriter streamWriter = new StreamWriter(fs); streamWriter.Write(traceOutput); streamWriter.Flush(); streamWriter.Close(); fs.Close(); } catch { } return(_OutputFilePath); }
public string GetTraceXmlText() { string traceXmlText = null; if (_TraceList.Count == 0) { return(null); } try { traceXmlText = Serialize.SerializeObject(this, typeof(TraceLogger)); } catch { } return(traceXmlText); }
public string DeserializeDirectorSettings(DirectorSettings directorSettings) { return(Serialize.SerializeObject(directorSettings, typeof(DirectorSettings))); }