Example #1
0
 public static void CloseLog()
 {
     if (LogToFile && !string.IsNullOrEmpty(LogFileName))
     {
         if (!Directory.Exists(FullLogPath))
         {
             Directory.CreateDirectory(FullLogPath);
         }
         using (TextWriter tw = new StreamWriter(Path.Combine(FullLogPath, LogFileName)))
         {
             tw.Write(LogString.ToString());
         }
     }
 }
Example #2
0
 [Test] public void ToString_()
 {
     o(valid.ToString(), "Foo");
     Assert.Throws <Ex>(() => invalid.ToString());
 }
Example #3
0
 public static void Log(string message)
 {
     LogString.AppendLine(message);
     EventLogTextView.Text = LogString.ToString();
 }