Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public string GetTraceXmlText()
        {
            string traceXmlText = null;

            if (_TraceList.Count == 0)
            {
                return(null);
            }
            try
            {
                traceXmlText = Serialize.SerializeObject(this, typeof(TraceLogger));
            }
            catch
            {
            }
            return(traceXmlText);
        }
Ejemplo n.º 3
0
 public string DeserializeDirectorSettings(DirectorSettings directorSettings)
 {
     return(Serialize.SerializeObject(directorSettings, typeof(DirectorSettings)));
 }